Confusion about locales and 'like' indexes

From: Dan Harris <fbsd(at)drivefaster(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Confusion about locales and 'like' indexes
Date: 2005-03-02 00:44:07
Message-ID: 124c40d023eab9ed34fda472fbb3db3f@drivefaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greetings,

I have been beating myself up today trying to optimize indices for a
query that uses LIKE. In my research I have read that the locale
setting may affect PostgreSQL's choice of seq scan vs index scan. I am
running Fedora Core 2 and it appears when I run "locale" that it is set
to 'en.US-UTF-8'.

Did I fall into a "gotcha" trap here about C vs non-C locales? I'm not
much of a C programmer so I have no idea what all this touches and
everything has been left as default during PG compilation as well as
Fedora install. I can pg_dump and initdb again with --locale=C if
this will allow my LIKE queries to use indexes, but I just wanted to
know if there was some other place I needed to change locales in the
system? e.g. postgresql.conf or env vars? Or, would the initdb and
reload alone fix it?

I'm running 8.0.1 if that matters.

Thanks

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Gaetano Mendola 2005-03-02 00:56:52 Re: Inheritence versus delete from
Previous Message John Arbash Meinel 2005-03-01 16:44:58 Re: multi billion row tables: possible or insane?