Re: Cross-column statistics revisited
От | Martijn van Oosterhout |
---|---|
Тема | Re: Cross-column statistics revisited |
Дата | |
Msg-id | 20081016175049.GC19967@svana.org обсуждение исходный текст |
Ответ на | Re: Cross-column statistics revisited ("Robert Haas" <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On Thu, Oct 16, 2008 at 01:34:59PM -0400, Robert Haas wrote: > I suspect that a lot of the correlations people care about are > extreme. For example, it's fairly common for me to have a table where > column B is only used at all for certain values of column A. Like, > atm_machine_id is usually or always NULL unless transaction_type is > ATM, or something. So a clause of the form transaction_type = 'ATM' > and atm_machine_id < 10000 looks more selective than it really is > (because the first half is redundant). That case is easily done by simply considering the indexed values of a column with a partial index. This should be fairly easy to do I think. It might be worthwhile someone trawling through the archives looking for examples where we estimate the correlation wrong. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
В списке pgsql-hackers по дате отправления: