From: Dan Harris <fbsd@drivefaster.net>
To: pgsql-performance@postgresql.org
Subject: Confusion about locales and 'like' indexes
Date: Tue, 1 Mar 2005 17:44:07 -0700
Message-ID: <124c40d023eab9ed34fda472fbb3db3f@drivefaster.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: fbsd@drivefaster.net
Subject: Re: Confusion about locales and 'like' indexes
In-Reply-To: <124c40d023eab9ed34fda472fbb3db3f@drivefaster.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox