Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

Next:From: Tom LaneDate: 2002-06-28 21:06:58
Subject: Re: Are statistics gathered on function indexes?
Previous:From: Ray OntkoDate: 2002-06-28 21:03:55
Subject: Re: Are statistics gathered on function indexes?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group