Re: empty string causes planner to avoid index. Makes me sad.
В списке pgsql-general по дате отправления:
| От | Guillaume Lelarge |
|---|---|
| Тема | Re: empty string causes planner to avoid index. Makes me sad. |
| Дата | |
| Msg-id | 200911272350.54263.guillaume@lelarge.info обсуждение |
| Ответ на | Re: empty string causes planner to avoid index. Makes me sad. (Jeff Amiel <becauseimjeff@yahoo.com>) |
| Список | pgsql-general |
Le vendredi 27 novembre 2009 à 23:32:14, Jeff Amiel a écrit : > --- 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. > > Aggregate (cost=231884.57..231884.57 rows=1 width=0) > > versus > > Aggregate (cost=34.83..34.83 rows=1 width=0) > But in the first example (the empty string one), it fetched 170468 rows from the index, and in the second one (the 17-spaces string), it fetched only 18 rows. It seems quite normal that the first one is costier then the second one. -- Guillaume. http://www.postgresqlfr.org http://dalibo.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера