indexes on varchar fields

From: Peter Nixon <listuser(at)peternixon(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: indexes on varchar fields
Date: 2002-11-08 11:37:00
Message-ID: 20021108133700.708dec47.listuser@peternixon.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys

I have a large database (actually a bunch of large databases) that a
running as the backends of radius servers running voip accounting.

The databases are getting quite large now and some queries are taking >
5min to return. Now I read somewhere that indexing varchar fields is not
particularly worth it especially if you are only doing queries
occasionally. I am doing 200-500 inserts per min but only a query run on
this particular field when I want to compare my flat file logs against
whats in the DB to see if they match for billing purposes.

Can someone inform me as to whether an index on the following field:

h323ConfID varchar(64) DEFAULT '' NOT NULL

Which contains data resembling the following:

41A4DCE3 8CF2D611 85170004 75AE73D4

which is most likely unique, but not guaranteed so, is going to be worth
it?

--

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurentiu Drob 2002-11-08 11:56:17 Re: Database design software
Previous Message Shridhar Daithankar 2002-11-08 11:24:53 Re: command