Re: Are statistics gathered on function indexes?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ray Ontko <rayo(at)ontko(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Are statistics gathered on function indexes?
Date: 2002-06-28 20:36:24
Message-ID: 9389.1025296584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ray Ontko <rayo(at)ontko(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ray Ontko 2002-06-28 20:42:01 Re: Are statistics gathered on function indexes?
Previous Message Ray Ontko 2002-06-28 19:43:11 Re: Are statistics gathered on function indexes?