Re: BUG #5539: Generally incorrect planner estimations on join with UNION ALL

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: BUG #5539: Generally incorrect planner estimations on join with UNION ALL
Дата
Msg-id AANLkTik4k7fc0CcBRztUdVnrFGV3YD_OYT3WBa5Fe7gG@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #5539: Generally incorrect planner estimations on join with UNION ALL  ("Maksym Boguk" <Maxim.Boguk@gmail.com>)
Список pgsql-bugs
On Sat, Jul 3, 2010 at 8:47 PM, Maksym Boguk <Maxim.Boguk@gmail.com> wrote:
> notable planner had correctly estimated amount of rows in one side of the
> join:
> (Append =A0(cost=3D0.00..0.98 rows=3D2 width=3D4))
> and planner hard correctly estimated amount of rows in the another side of
> the join:
> Index Scan using t3_value_key on t3 =A0(cost=3D0.00..0.49 rows=3D1 width=
=3D8)
>
> And instead of use 2(from append)*1(from scan on t3)=3D2 as final row
> estimation, planner chooses use heuristic value 1000.

2 isn't necessarily correct, because the two rows on the outer side
needn't match the 1 row on the inner side - it could be less.

But I agree with you that the estimate of 1000 doesn't seem to make
much sense.  I'm not sure where that's coming from.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5548: ERROR: invalid attnum ## for rangetable entry on EXPLAIN VERBOSE, not on EXPLAIN
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5548: ERROR: invalid attnum ## for rangetable entry on EXPLAIN VERBOSE, not on EXPLAIN