Re: Cross-column statistics revisited
От | Tom Lane |
---|---|
Тема | Re: Cross-column statistics revisited |
Дата | |
Msg-id | 14436.1224247571@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Cross-column statistics revisited (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes: > Just a note: using a multidimensional histograms will work well for the > cases like (startdate,enddate) where the histogram will show a > clustering of values along the diagonal. But it will fail for the case > (zipcode,state) where one implies the other. Histogram-wise you're not > going to see any correlation at all Huh? Sure you are. What the histogram will show is that there is only one state value per zipcode, and only a limited subset of zipcodes per state. The nonempty cells won't cluster along the "diagonal" but we don't particularly care about that. What we really want from this is to not think thatWHERE zip = '80210' AND state = 'CA' is significantly more selective than justWHERE zip = '80210' A histogram is certainly capable of telling us that. Whether it's the most compact representation is another question of course --- in an example like this, only about 1/50th of the cells would contain nonzero counts ... regards, tom lane
В списке pgsql-hackers по дате отправления: