Using indices with LIKE - Mailing list pgsql-sql

From Llew Sion Goodstadt
Subject Using indices with LIKE
Date
Msg-id 001101c1a6a6$bc00de40$1c1d01a3@FGU028
Whole thread Raw
In response to Re: Resources  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Thanks. You have saved my life!
I should perhaps have noticed the bit in the administrator's guide on
localisation.
Never thought it would be relevant.    
I have reloaded the database after a new initdb and restarting
postmaster after changing the environment ("export LANG=C").
Everything now works.

(I write in all this detail so that the next poor sod doesn't have to go
through the same hellish experience :->

Llew

> Probably you initialized the database in non-C locale.  
> Anchored searches can only be optimized with index scans in C 
> locale; the index ordering isn't necessarily right in other locales.
> 
> You can check the database locale with 
> contrib/pg_controldata, or if that's not handy try
>     od -c $PGDATA/global/pg_control
> and look for locale names near the end of the file.
> 
>             regards, tom lane
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an 
> appropriate subscribe-nomail command to 
> majordomo@postgresql.org so that your message can get through 
> to the mailing list cleanly
> 



pgsql-sql by date:

Previous
From: "Llew Goodstadt"
Date:
Subject: Re: Resources
Next
From: "D'laila Pereira"
Date:
Subject: test the existence of a database