Re: Weird, bad 0.5% selectivity estimate for a column equal to itself - Mailing list pgsql-performance

From Tom Lane
Subject Re: Weird, bad 0.5% selectivity estimate for a column equal to itself
Date
Msg-id 25930.1371850378@sss.pgh.pa.us
Whole thread Raw
In response to Weird, bad 0.5% selectivity estimate for a column equal to itself  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:
> I'm getting something really odd in 9.2.4, where the planner estimates
> that the selectivity of a column equal to itself is always exactly 0.5%
> (i.e. 0.005X).  I can't figure out where this constant is coming from,
> or why it's being applied.

See DEFAULT_EQ_SEL.  But why exactly do you care?  Surely it's a stupid
query and you should fix it.

            regards, tom lane


pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Weird, bad 0.5% selectivity estimate for a column equal to itself
Next
From: Josh Berkus
Date:
Subject: Re: Weird, bad 0.5% selectivity estimate for a column equal to itself