Re: Bad estimate on LIKE matching

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Bad estimate on LIKE matching
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE6C7EC8@algol.sollentuna.se
обсуждение исходный текст
Ответ на Bad estimate on LIKE matching  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-hackers
> > I have tried upping the statistics target up to 1000, with
> no changes.
>
> > Any way to teach the planner about this?
>
> In a recent thread on -perform, I opined that this case could
> best be solved by using dynamic random block sampling at plan
> time followed by a direct evaluation of the LIKE against the
> sample. This would yield a more precise selectivity and lead
> to the better plan. So it can be improved for the next release.

I was kinda hoping for something I could use in 8.1 :-) Even if it's an
ugly solution for now. (My current workaround of writing it to a temp
table and the joining to the temp table causes a reasonable plan, but
I'd like something slightly less ugly than that if possible..)

//Magnus


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: equivalence class not working?
Следующее
От: Leandro Guimarães Faria Corcete DUTRA
Дата:
Сообщение: Re: Surrogate keys (Was: enums)