Re: statistics horribly broken for row-wise comparison
От | Tom Lane |
---|---|
Тема | Re: statistics horribly broken for row-wise comparison |
Дата | |
Msg-id | 2973.1236051231@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: statistics horribly broken for row-wise comparison (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: statistics horribly broken for row-wise comparison
|
Список | pgsql-hackers |
Merlin Moncure <mmoncure@gmail.com> writes: > On Mon, Mar 2, 2009 at 8:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Merlin Moncure <mmoncure@gmail.com> writes: >>> It looks like for row-wise comparison, only the first column is used >>> for generating the expected row count. >> >> [ shrug... ] �Short of multi-column statistics, it's hard to see how to >> do better. > hm... Why can't you just multiply the range estimates for the fields > together when doing an operation over the key? Because it would be the wrong answer, except in the uncommon case where the field values are completely independent (at least, I would expect that to be uncommon when people have multicolumn indexes on them). In the case at hand, I think you're barking up the wrong tree anyway. It's much more likely that what we need to do is fix clauselist_selectivity to recognize range conditions involving RowCompareExprs. regards, tom lane
В списке pgsql-hackers по дате отправления: