pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Porter <mike@udel.edu>
Cc: pgsql-bugs@postgresql.org
Subject: Re: INET datatype and '<<' operator results in bad row estimate
Date: Tue, 15 Jul 2014 14:43:56 -0400
Message-ID: <8218.1405449836@sss.pgh.pa.us> (raw)
In-Reply-To: <alpine.OSX.2.00.1407151401500.26745@enva.ybpny>
References: <alpine.OSX.2.00.1407151401500.26745@enva.ybpny>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.g...

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

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)

Message-ID: <8218.1405449836@sss.pgh.pa.us>
Permalink:  ../8218.1405449836@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8218.1405449836@sss.pgh.pa.us

 · 

reply

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, mike@udel.edu
  Subject: Re: INET datatype and '<<' operator results in bad row estimate
  In-Reply-To: <8218.1405449836@sss.pgh.pa.us>
  References: <alpine.OSX.2.00.1407151401500.26745@enva.ybpny> <8218.1405449836@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