Efficiency of indexes on CHAR(n) and VARCHAR(n)

From: Brian Hurt <bhurt(at)janestcapital(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Efficiency of indexes on CHAR(n) and VARCHAR(n)
Date: 2006-05-04 17:06:10
Message-ID: 445A3482.7050509@janestcapital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I've heard that doing indexes on CHAR(n) and VARCHAR(n) fields are dog
slow. But that's mainly been with the commercial databases- Sybase and
Oracle. Is this true with Postgres as well?

Or, to put it more specifically, is it true enough that it is worthwhile
for me to calculate the hash values of the CHAR fields and put the index
there (I don't need to do selects using 'LIKE'). This means more
complexity and higher maintainance than just slapping an index on the
string field.

Thanks,
Brian

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2006-05-04 17:14:27 Re: Efficiency of indexes on CHAR(n) and VARCHAR(n)
Previous Message Aarni Ruuhimäki 2006-05-04 16:10:00 Re: Scheduled function ?