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)
Список pgsql-bugs
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,
sincepartial 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
Дата:
Сообщение: [BUGS] BUG #14753: Bad selectivity estimation with functional partial index
Следующее
От: Chris Pacejo
Дата:
Сообщение: Re: [BUGS] BUG #14691: Isolation failure in deferrable transactionconcurrent with schema change