Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)

Zeugswetter Andreas <andreas.zeugswetter@telecom.at>

From: Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at>
To: pgsql-hackers@postgreSQL.org
Date: 1999-07-28T07:49:26Z
Lists: pgsql-hackers
> So, the selectivity that a search for the most common value would
> have is a reasonable estimate for the selectivity of a search for any
> value.  That's a bogus assumption in this case --- but it's hard to
> justify making any other assumption in general.
> 
Other db's usually use the value count(*) / nunique for the light weight
statistics.
This makes the assumptoin that the distinct index values are evenly
distributed.
That is on average a correct assumption, whereas our assumption on average
overestimates the number of rows returned.
I am not sure we have a nunique info though.

Andreas