Re: empty string causes planner to avoid index. Makes me sad.
В списке pgsql-general по дате отправления:
| От | Stephan Szabo |
|---|---|
| Тема | Re: empty string causes planner to avoid index. Makes me sad. |
| Дата | |
| Msg-id | 20091127145258.K69561@megazone.bigpanda.com обсуждение |
| Ответ на | Re: empty string causes planner to avoid index. Makes me sad. (Jeff Amiel <becauseimjeff@yahoo.com>) |
| Список | pgsql-general |
On Fri, 27 Nov 2009, Jeff Amiel wrote: > --- On Fri, 11/27/09, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > > You didn't show us any evidence of that, either.� Both > > of your test > > cases are using the index. > > Ok...third try. The cost when passing in an empty string is > SIGNIFICANTLY higher than when not. Wouldn't seem that the planner is > using the index effectively. But it's also estimating that it's aggregating over around 10000 times as many rows presumably because it thinks empty string is alot more common. That might not be the case in the actual data, but the estimated difference is the likely cause of the plan differences. What are the actual runtimes and rowcounts for the queries with different values you're trying? Explain analyze output would be useful for that.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера