Re: INET datatype and '<<' operator results in bad row estimate - Mailing list pgsql-bugs

From Tom Lane
Subject Re: INET datatype and '<<' operator results in bad row estimate
Date
Msg-id 8218.1405449836@sss.pgh.pa.us
Whole thread Raw
In response to INET datatype and '<<' operator results in bad row estimate  (Mike Porter <mike@udel.edu>)
List pgsql-bugs
Mike Porter <mike@udel.edu> writes:
> Postgres version: 9.3.4
> Note: This behavior appears to have been fixed in 9.4-beta1.  I am
> reporting it in case it can be fixed in 9.3.x.  Perhaps it should be
> mentioned in the 9.4.x release notes (or did I miss it?)

Before 9.4, inet<<inet had no selectivity estimator at all, so you got
a default selectivity estimate of 0.5.  In 9.4 there is an estimator
function, but it's only a stub returning a constant estimate of 0.001;
so that makes this example better but only by luck.  There's some work in
progress to replace the stub with real selectivity estimation, but it
won't appear in any release before 9.5:

http://www.postgresql.org/message-id/flat/CAE2gYzwNBfGe9+1RP4UU6be9q2_m7Bfe6T18JgBSV4qJrkmxEQ@mail.gmail.com

If you're interested, please help test that patch.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Mike Porter
Date:
Subject: INET datatype and '<<' operator results in bad row estimate
Next
From: Tom Lane
Date:
Subject: Re: Compile fails on AIX 6.1