| От | Tom Lane |
|---|---|
| Тема | Re: partial unique index and the planner |
| Дата | |
| Msg-id | 23419.1234723265@sss.pgh.pa.us обсуждение |
| Ответ на | partial unique index and the planner (Michal Politowski <mpol+pg@meep.pl>) |
| Ответы |
Re: partial unique index and the planner
|
| Список | pgsql-general |
Michal Politowski <mpol+pg@meep.pl> writes:
> Is it normal that plans using a scan on a partial unique index
> estimate that much more than one row is returned?
There isn't currently any special logic to recognize that case;
the estimate is just whatever is going to come out of the normal
statistics-based estimation.
I'm unsure how hard it'd be to improve the situation. If we've already
identified relevant partial indexes before any of the stats code has to
run then it'd be pretty easy, but that might be a bit fragile.
Anyway, the usual advice for such cases is to see if raising the
statistics target helps.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера