From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Ivan Voras <ivoras@freebsd.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query performance with disabled hashjoin and mergejoin
Date: Tue, 08 Mar 2011 16:24:25 -0500
Message-ID: <28147.1299619465@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTi=0vmK_--w8iXDx5Ryo9_=bhdOzW-nhoQQnhSf_@mail.gmail.com>
References: <iigq7o$3ub$1@dough.gmane.org>
<AANLkTin9mtP+F_T0G_iGU+mXH7OTp-EqFY_gUyzpDODR@mail.gmail.com>
<AANLkTinansJ5OyCbfpceDF6WxJ4A=U_+h3B_ak2X7KHz@mail.gmail.com>
<AANLkTi=0vmK_--w8iXDx5Ryo9_=bhdOzW-nhoQQnhSf_@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> The reason I thought cross-column correlations might be relevant is
> that the bitmap index scan on news_visible_from is quite accurate
> (19976 estimated vs. 19932 actual) and the bitmap index scan on
> news_visible_to is tolerably accurate (151 estimated vs. 41 actual)
> but the estimate on the BitmapOr is somehow totally wrong (20127
> estimated vs. 0 actual). But on further reflection that doesn't make
> much sense. How can the BitmapOr produce fewer rows than the sum of
> its constituent inputs?
That's not an estimation bug, that's a measurement bug. We don't try to
count the actual number of rows present in the result of a BitmapOr or
BitmapAnd node. (It would be impractical in lossy cases anyway, not to
mention expensive.)
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, robertmhaas@gmail.com, mmoncure@gmail.com, ivoras@freebsd.org
Subject: Re: Query performance with disabled hashjoin and mergejoin
In-Reply-To: <28147.1299619465@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