From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Weird, bad 0.5% selectivity estimate for a column equal to itself
Date: Fri, 21 Jun 2013 17:32:58 -0400
Message-ID: <25930.1371850378@sss.pgh.pa.us> (raw)
In-Reply-To: <51C4AEE5.8040704@agliodbs.com>
References: <51C4AEE5.8040704@agliodbs.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com
Subject: Re: Weird, bad 0.5% selectivity estimate for a column equal to itself
In-Reply-To: <25930.1371850378@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