Re: Question on Index usage - Mailing list pgsql-admin

From Tom Lane
Subject Re: Question on Index usage
Date
Msg-id 2116.1232551538@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question on Index usage  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Question on Index usage  (Michael Monnerie <michael.monnerie@is.it-management.at>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum daemon
Next
From: Michael Monnerie
Date:
Subject: Re: Question on Index usage