Re: Bug #4284

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #4284
Дата
Msg-id 25688.1234305004@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug #4284  ("David Rowley" <dgrowley@gmail.com>)
Ответы Re: Bug #4284
Re: Bug #4284
Список pgsql-hackers
"David Rowley" <dgrowley@gmail.com> writes:
> My report contained a full re-creation script to reproduce the problem and
> tonight I'm having the same problem with CVS Head. To my untrained eye it
> looks like the planner is not properly pushing down the row count. 

It looks more like a multicolumn selectivity issue to me.  The planner
is supposing that the join condition

ON t1.productiondate = t2.productiondate AND t1.lineid = t2.lineid  AND t1.partcode = t2.partcode

is going to eliminate some fair-size fraction of t1 rows, whereas in
fact the construction of t2 is such that it won't eliminate any of them.
This is less obviously true for the join to t4, but I imagine from the
rowcounts that it's also true there.  So you get an unreasonably small
rowcount for whichever join gets done first, and then the nestloop plan
looks like a good idea for the second join.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Optimization rules for semi and anti joins
Следующее
От: Tom Lane
Дата:
Сообщение: Re: The testing of multi-batch hash joins with skewed data sets patch