From: carex@skynet.be
To: pgsql-sql@postgresql.org
Subject: Re: select using regexp does not use indexscan
Date: 15 Nov 2004 09:12:30 -0800
Message-ID: <3a0a211c.0411150912.414d1ecb@posting.google.com> (raw)
References: <3a0a211c.0411091202.223f1c02@posting.google.com>
<20041113133651.A44723@megazone.bigpanda.com>
<3972.1100390524@sss.pgh.pa.us>
tgl@sss.pgh.pa.us (Tom Lane) wrote in message news:<3972.1100390524@sss.pgh.pa.us>...
> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > On Tue, 9 Nov 2004, carex wrote:
> >> And it works also perfectly with Gentoo.
> >> So,is this a typical "Redhat Enterprise" problem ?
> >> Or do I overlook something ??
>
> > IIRC, in 7.3.x, index scans are only considered in "C" locale for
> > regexp/LIKE. In 7.4.x, non-"C" locale databases can use a special
> > index of a different opclass (<typename>_pattern_ops I believe).
>
> Not sure if this answer was explicit enough, so: evidently the database
> was initdb'd in "C" locale on Gentoo, but in some other locale on Red Hat.
> The only "typical Red Hat problem" is that they are more enthusiastic
> about setting up non-C default locales than some other distros.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
Thank you so much.
It is indeed clearer now.
So I did an initdb --locale=C -D /path/to/data
rebuild my database and started my "select" again.
I could see my index was used even when host~'^tna2';
Thanks again.
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-sql@postgresql.org
Cc: carex@skynet.be
Subject: Re: select using regexp does not use indexscan
In-Reply-To: <3a0a211c.0411150912.414d1ecb@posting.google.com>
* 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