| От | Tom Lane |
|---|---|
| Тема | Re: Strange behavior of function date_trunc |
| Дата | |
| Msg-id | 4175001.1620328453@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Strange behavior of function date_trunc (Pavel Luzanov <p.luzanov@postgrespro.ru>) |
| Ответы |
Re: Strange behavior of function date_trunc
|
| Список | pgsql-general |
Pavel Luzanov <p.luzanov@postgrespro.ru> writes:
> One thing remains unclear.
> Why, if a scalar subquery is used to materialize the function value(even
> constant), then an inefficient index scan is chosen:
The scalar subquery prevents the planner from seeing the actual
comparison value, so it falls back to a default selectivity estimate
(notice the fairly bad rowcount estimate). I'm a bit surprised that
that would end in choosing an indexscan over a seqscan, but that
might be a consequence of the small random_page_cost you're using.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера