Re: After VACUUM, statistics become skewed - Mailing list pgsql-admin

From Tom Lane
Subject Re: After VACUUM, statistics become skewed
Date
Msg-id 3276.1053835932@sss.pgh.pa.us
Whole thread Raw
In response to Re: After VACUUM, statistics become skewed  (Robert.Farrugia@go.com.mt)
List pgsql-admin
Robert.Farrugia@go.com.mt writes:
> Running a slightly modified query i.e. removing the in and using an
> equality, the planner uses the "correct" index this time.

Hm.  What were the definitions of the two indexes, exactly?

There is an asymmetry in the planner's handling of AND/OR clauses that
can cause it to fail to recognize that a multicolumn index is usable,
depending on whether the OR clause (the IN part of your query) applies
to the first index column or a later one.  I'm not sure if this relates
to your problem or not, though...

            regards, tom lane

pgsql-admin by date:

Previous
From: "David A. Leedom"
Date:
Subject: Re: Postgress
Next
From: "Eko Pranoto"
Date:
Subject: vacuum info - crash