From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Smet <guillaume.smet@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Estimation problem with a LIKE clause containing a /
Date: Wed, 07 Nov 2007 11:58:49 -0500
Message-ID: <18180.1194454729@sss.pgh.pa.us> (raw)
In-Reply-To: <1d4e0c10711070852hfc8aaf2o6eb0cdace2efc9b5@mail.gmail.com>
References: <1d4e0c10711070453q214f089cpd144cbb5193d3c4f@mail.gmail.com>
<17767.1194453292@sss.pgh.pa.us>
<1d4e0c10711070852hfc8aaf2o6eb0cdace2efc9b5@mail.gmail.com>
"Guillaume Smet" <guillaume.smet@gmail.com> writes:
> On 11/7/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Hmmm ... what locale are you working in? I notice that the range
>> estimator for this pattern would be "ancestors >= '1062/' AND
>> ancestors < '10620'", which will do the right thing in C locale
>> but maybe not so much elsewhere.
> Sorry for not having mentioned it before. Locale is UTF-8.
I wanted the locale (lc_collate), not the encoding.
> I suppose my best bet is to remove the pg_statistic line and to set
> the statistics to 0 for this column so that the stats are never
> generated again for this column?
That would optimize this particular query and probably pessimize
a lot of others. I have another LIKE-estimation bug to go look at
today too; let me see if this one is fixable or not.
regards, tom lane
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: tgl@sss.pgh.pa.us, guillaume.smet@gmail.com
Subject: Re: Estimation problem with a LIKE clause containing a /
In-Reply-To: <18180.1194454729@sss.pgh.pa.us>
* 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