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 21:05:33
Message-ID: 9676.1025298333@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> The stats themselves look fine to me; I think there must be a
> mathematical error in what selfuncs.c is doing with them.
> Still looking to find it...

Oh, I see it: range selectivity double-excludes NULLs. See the comment
for clauselist_selectivity in src/backend/optimizer/path/clausesel.c.
The individual estimates for the two component comparison operators
each exclude nulls, and when we merge them together we get the wrong
answer.

Good catch! (Though I'm surprised no one noticed this before; with a
larger null population the error would be much more obvious.)

I'm running out of time today but will look into a fix later.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-06-28 21:06:58 Re: Are statistics gathered on function indexes?
Previous Message Ray Ontko 2002-06-28 21:03:55 Re: Are statistics gathered on function indexes?