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

From: Zeugswetter Andreas IZ5 <Andreas(dot)Zeugswetter(at)telecom(dot)at>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
Date: 1999-07-28 07:49:26
Message-ID: 219F68D65015D011A8E000006F8590C60339E093@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas IZ5 1999-07-28 08:00:28 Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
Previous Message Hiroshi Inoue 1999-07-28 05:34:38 double opens