From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ray Ontko <rayo@ontko.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Are statistics gathered on function indexes?
Date: Fri, 28 Jun 2002 16:36:24 -0400
Message-ID: <9389.1025296584@sss.pgh.pa.us> (raw)
In-Reply-To: <200206281943.OAA06865@shire.ontko.com>
References: <200206281943.OAA06865@shire.ontko.com>
Ray Ontko <rayo@ontko.com> writes:
> 1) here's the "bad" stats.
> 2) here's the "good" stats.
> Note that the information really is different.
Yeah. It seems that the critical difference is the null_frac; if I take
your "bad" values and change null_frac to 0 then I get
reasonable-looking answers, but with null_frac = 0.000333333 I indeed
get bad answers. I suspect null_frac is getting double-counted
somewhere, and depending on just how many nulls ANALYZE happens to find,
you might get pushed over the edge from a small selectivity to zero or
negative selectivity. Will dig further.
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, rayo@ontko.com
Subject: Re: Are statistics gathered on function indexes?
In-Reply-To: <9389.1025296584@sss.pgh.pa.us>
References: <200206281943.OAA06865@shire.ontko.com> <9389.1025296584@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