Re: Bug #4284

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #4284
Дата
Msg-id 22820.1234394310@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug #4284  ("David Rowley" <dgrowley@gmail.com>)
Список pgsql-hackers
"David Rowley" <dgrowley@gmail.com> writes:
> I thought about this after sending my reply to this last night. I remembered
> when I created my test case I had to add the other tables to get the nest
> loop behaviour. I'm not sure your guess about the multicolumn selectivity
> issue is correct. I re-tested with the following query.
> ...
> Perfect row estimate!

The reason for that is that the planner knows that a LEFT JOIN result
can't be smaller than the left input, so whatever join size estimate it
comes up with from statistics will be clamped to be at least that much.
If you change the test case to an inner join you still get the one-row
rowcount estimate, same as for the join to t2.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: A deprecation policy
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange issue with CREATE OPERATOR CLASS