From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: PGSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: 8.4 optimization regression?
Date: Sun, 04 Sep 2011 18:14:59 -0400
Message-ID: <8731.1315174499@sss.pgh.pa.us> (raw)
In-Reply-To: <4E601B2F.30107@catalyst.net.nz>
References: <4E5331FF.3000900@catalyst.net.nz>
<15708.1314155740@sss.pgh.pa.us>
<4E5DCFA4.5090806@catalyst.net.nz>
<5156.1314829311@sss.pgh.pa.us>
<26940.1314918836@sss.pgh.pa.us>
<4E6012E2.2000004@catalyst.net.nz>
<4E601B2F.30107@catalyst.net.nz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mark.kirkwood@catalyst.net.nz
Subject: Re: 8.4 optimization regression?
In-Reply-To: <8731.1315174499@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox