From: Tom Lane <tgl@sss.pgh.pa.us>
To: greigwise <greigwise@comcast.net>
Cc: pgsql-general@postgresql.org
Subject: Re: BitmapAnd on correlated column?
Date: Fri, 04 Oct 2019 09:35:05 -0400
Message-ID: <4678.1570196105@sss.pgh.pa.us> (raw)
In-Reply-To: <1570195176826-0.post@n3.nabble.com>
References: <1570137723639-0.post@n3.nabble.com>
<de2512092768eaeed48084d4fc7e8891c6652a13.camel@cybertec.at>
<1570195176826-0.post@n3.nabble.com>
greigwise <greigwise@comcast.net> writes:
> Granted it cannot skip the condition, but that doesn't mean that it has to
> use that second index. It's doing a recheck on the conditions anyway,
> right?
I'm afraid you're out of luck on that for now. In principle, the
presence of extended stats on the column combination might allow
the planner to figure out that the second IN condition adds little
selectivity. But I'm not sure how hard it would be, and I am sure
that the extended-stats logic hasn't been built out in that direction
yet.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, greigwise@comcast.net
Subject: Re: BitmapAnd on correlated column?
In-Reply-To: <4678.1570196105@sss.pgh.pa.us>
References: <1570137723639-0.post@n3.nabble.com> <de2512092768eaeed48084d4fc7e8891c6652a13.camel@cybertec.at> <1570195176826-0.post@n3.nabble.com> <4678.1570196105@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