Re: Weird, bad 0.5% selectivity estimate for a column equal to itself

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Weird, bad 0.5% selectivity estimate for a column equal to itself
Date: 2013-06-21 21:32:58
Message-ID: 25930.1371850378@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2013-06-21 22:21:28 Re: Weird, bad 0.5% selectivity estimate for a column equal to itself
Previous Message Josh Berkus 2013-06-21 19:52:05 Weird, bad 0.5% selectivity estimate for a column equal to itself