Re: [PATCH] Add extra statistics to explain for Nested Loop

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: [PATCH] Add extra statistics to explain for Nested Loop
Дата
Msg-id CAFj8pRDEVGVjYrhcLbLVSJq8i-QP86yAp6D=rsS1WuRRmR1N6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add extra statistics to explain for Nested Loop  (Anastasia Lubennikova <a.lubennikova@postgrespro.ru>)
Ответы Re: [PATCH] Add extra statistics to explain for Nested Loop  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers


so 17. 10. 2020 v 0:11 odesílatel Anastasia Lubennikova <a.lubennikova@postgrespro.ru> napsal:
On 16.10.2020 12:07, Julien Rouhaud wrote:
Le ven. 16 oct. 2020 à 16:12, Pavel Stehule <pavel.stehule@gmail.com> a écrit :


pá 16. 10. 2020 v 9:43 odesílatel <e.sokolova@postgrespro.ru> napsal:
Hi, hackers.
For some distributions of data in tables, different loops in nested loop
joins can take different time and process different amounts of entries.
It makes average statistics returned by explain analyze not very useful
for DBA.
To fix it, here is the patch that add printing of min and max statistics
for time and rows across all loops in Nested Loop to EXPLAIN ANALYSE.
Please don't hesitate to share any thoughts on this topic!

+1

This is great feature - sometimes it can be pretty messy current limited format

+1, this can be very handy! 

Cool.
I have added your patch to the commitfest, so it won't get lost.
https://commitfest.postgresql.org/30/2765/

I will review the code next week.  Unfortunately, I cannot give any feedback about usability of this feature.

User visible change is:

-               ->  Nested Loop (actual rows=N loops=N)
+              ->  Nested Loop (actual min_rows=0 rows=0 max_rows=0 loops=2)


This interface is ok - there is not too much space for creativity. I can imagine displaying variance or average - but I am afraid about very bad performance impacts.

Regards

Pavel


Pavel, Julien, could you please say if it looks good?

-- 
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: [PATCH] Add extra statistics to explain for Nested Loop