Re: [BUGS] BUG #14753: Bad selectivity estimation with functional partial index

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: [BUGS] BUG #14753: Bad selectivity estimation with functional partial index
Дата
Msg-id
27613.1500479123@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
[BUGS] BUG #14753: Bad selectivity estimation with functional partial index dilaz03@gmail.com
Re: [BUGS] BUG #14753: Bad selectivity estimation with functional partial index Tom Lane <tgl@sss.pgh.pa.us>
dilaz03@gmail.com writes:
> Postgres doesn't see corresponding stats tuple for functional partial
> index.

That's not a bug, it's intentional, per the comment in examine_variable():
                        * Has it got stats?  We only consider stats for                        * non-partial indexes, since partial indexes probably                        * don't reflect whole-relation statistics; the above                        * check for uniqueness is the only info we take from                        * a partial index.

It's theoretically possible that we could do something useful with stats
from a partial index, but it would require a lot of shaky assumptions
I'm afraid.
		regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления
От: dilaz03@gmail.com
Дата:
От: Chris Pacejo
Дата:
FAQ