From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Matthew Gabeler-Lee <mgabelerlee(at)zycos(dot)com> |
Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: 7.3 no longer using indexes for LIKE queries |
Date: | 2002-12-04 00:30:51 |
Message-ID: | 3DED4CBB.4010200@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Matthew Gabeler-Lee wrote:
> I have a database that has a lot of records (~6mil, iirc), with a varchar
> column that often wants to be queried using something like "where acc like
> 'foo%'". There is a B-Tree index on the acc column. In 7.2.3, Postgres
> would use that index to do the queries and things were lightning fast. In
> 7.3, it is refusing to use the index, even if I set enable_seqscan = off,
> meaning that the query that used to take a few msec now takes a few aeons.
> I've run vacuum analyze on the whole database, and it doesn't change
> anything.
Whats the output of pg_controldata, specifically, what is LC_COLLATE? If it
isn't "C", then LIKE won't use your index.
See:
http://developer.postgresql.org/docs/postgres/charset.html
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Gabeler-Lee | 2002-12-04 00:41:12 | Re: 7.3 no longer using indexes for LIKE queries |
Previous Message | Stephan Szabo | 2002-12-04 00:29:14 | Re: 7.3 no longer using indexes for LIKE queries |