Re: 8.4 optimization regression? - Mailing list pgsql-performance

From Tom Lane
Subject Re: 8.4 optimization regression?
Date
Msg-id 8731.1315174499@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.4 optimization regression?  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
List pgsql-performance
Mark Kirkwood <mark.kirkwood@catalyst.net.nz> writes:
> While this is still fresh in your mind, a couple of additional anti join
> queries are still managing to sneak past estimation:

Yeah, those are estimating that all the outer rows have join partners,
because there are more distinct values in the sub-select than there are
in the outer relation.  AFAICS there are not any errors in the
statistics, it's just that the estimation rule falls down here.

If you've heard of a better estimator for semijoin/antijoin selectivity,
I'm all ears.  The best idea I have at the moment is to put an arbitrary
upper limit on the estimated selectivity, but that would be, well,
arbitrary.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: Query performance issue
Next
From: Jayadevan M
Date:
Subject: Re: Query performance issue