From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Broken selectivity with special inet operators
Date: Wed, 21 Sep 2011 20:48:03 -0400
Message-ID: <5458.1316652483@sss.pgh.pa.us> (raw)
In-Reply-To: <4E7A833B.1010609@agliodbs.com>
References: <4E7A4923.1020900@agliodbs.com>
<29153.1316638577@sss.pgh.pa.us>
<4E7A547C.40700@agliodbs.com>
<629.1316642270@sss.pgh.pa.us>
<4E7A833B.1010609@agliodbs.com>
Josh Berkus <josh@agliodbs.com> writes:
>> If you mean the indexscan optimization, we do know how to estimate the
>> cost of the indexscans, because that depends mostly on the behavior of
>> the added < or > condition(s). This does not imply knowing how to
>> estimate the behavior of >>= itself.
> If we can estimate the cost of the indexscan, why can't we estimate the
> rowcount?
Because the estimated rowcount is derived long before we consider whether
to use an indexscan at all, and indeed must be computable whether the
table has any related index or not. The special-indexscan-qual code is
*not* a substitute for providing a selectivity estimator.
It's possible that we could build simple estimators for these operators
that just turn the problem into a range estimation and then pass it off
to somewhere else, but nobody has tried.
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
Subject: Re: Broken selectivity with special inet operators
In-Reply-To: <5458.1316652483@sss.pgh.pa.us>
References: <4E7A4923.1020900@agliodbs.com> <29153.1316638577@sss.pgh.pa.us> <4E7A547C.40700@agliodbs.com> <629.1316642270@sss.pgh.pa.us> <4E7A833B.1010609@agliodbs.com> <5458.1316652483@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