Re: Question on Index usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question on Index usage
Дата
Msg-id 2116.1232551538@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question on Index usage  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Question on Index usage  (Michael Monnerie <michael.monnerie@is.it-management.at>)
Список pgsql-admin
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Seems like the problem is that it is not pushing the "status IN"
> condition as part of the index condition for some reason, and instead
> using it as a filter.  Maybe something to do with the selectivity of
> that clause?

No, AFAIR the planner will *always* include every possibly relevant
condition for a given index.  If the condition is useless or nearly so,
that might prompt it to pick a different index instead, but not to omit
the indexqual.  I'm thinking it's not believing it can use the status
condition with that index, perhaps for datatype reasons.  What is status
declared as, exactly?

Also, what PG version is this?

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: autovacuum daemon
Следующее
От: Michael Monnerie
Дата:
Сообщение: Re: Question on Index usage