Re: Estimation problem with a LIKE clause containing a /

Поиск
Список
Период
Сортировка
От Guillaume Smet
Тема Re: Estimation problem with a LIKE clause containing a /
Дата
Msg-id 1d4e0c10711070852hfc8aaf2o6eb0cdace2efc9b5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Estimation problem with a LIKE clause containing a /  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Estimation problem with a LIKE clause containing a /  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
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.

> > Version is PostgreSQL 8.1.8 on i686-redhat-linux-gnu,
>
> You'd probably get better results with 8.2, which has a noticeably
> smarter LIKE-estimator, at least for histogram sizes of 100 or more.

It's not really possible to upgrade this application to 8.2 for now.
It's a very old app based on the thing formerly called as Red Hat WAF
and now known as APLAWS and validating WAF and this application with
8.2 will take quite some time. Moreover the db is big and we can't
afford the downtime of a migration.

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?

Thanks,

--
Guillaume

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Estimation problem with a LIKE clause containing a /
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Estimation problem with a LIKE clause containing a /