Re: BUG #15233: Error in estimation leads to very bad parralel planin simple 2 table join.

Поиск
Список
Период
Сортировка
От Maxim Boguk
Тема Re: BUG #15233: Error in estimation leads to very bad parralel planin simple 2 table join.
Дата
Msg-id CAK-MWwRh=J70OTJYtct-j=RV2BmPtq4bhMzgPtwN4Vc0ygBcxQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15233: Error in estimation leads to very bad parralel planin simple 2 table join.  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-bugs

>  Planning time: 2.953 ms
>  Execution time: 2084537.882 ms
>
> Problem with estimation of selectivity
>    ->  Seq Scan on area a  (cost=0.00..265.70 rows=1 width=106) (actual
> time=0.669..1.756 rows=23 loops=1)
>         
​​
Filter: ((path)::text ~~ '%.1806.%'::text)
> leads to very dangerous idea to perform nested loop with very heavy parallel
> plan inside.
>

Is it because you have not performed Analyze on the 'area' or is it
something else due to which there is such a deviation in estimation?



​Hi,​

I don't think there is good way estimate selectivity of
Filter: ((path)::text ~~ '%.1806.%'::text)

But problem that there huge difference in real plan cost with exactly 1 row vs 2 or more rows estimated. Problem still exists without parallel plan involved, where is leads to 23 seq scan over table with 100M rows :(.


--
Maxim Boguk
Senior Postgresql DBA
http://dataegret.com/

Phone RU: +7  985 433 0000
Phone UA: +380 99 143 0000
Phone AU: +61  45 218 5678

LinkedIn: http://www.linkedin.com/pub/maksym-boguk/80/b99/b1b
Skype: maxim.boguk

"Доктор, вы мне советовали так не делать, но почему мне по-прежнему больно когда я так делаю ещё раз?"

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: BUG #15233: Error in estimation leads to very bad parralel planin simple 2 table join.
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #15225: [XX000] ERROR: invalid DSA memory alloc request size1073741824 / Where: parallel worker