Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
От | Bruce Momjian |
---|---|
Тема | Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect) |
Дата | |
Msg-id | 199907281543.LAA11093@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect) (Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at>) |
Список | 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. > Yes, that's the problem. Figuring out the number of uniques is hard, expecially with no index. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: