EXPLAIN BUFFERS and I/O timing accounting questions

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема EXPLAIN BUFFERS and I/O timing accounting questions
Дата
Msg-id CAOtHd0AjLpmE1gZ35czZcGVyoje5vg+OTSRuvnL6TT7tT_BzwA@mail.gmail.com
обсуждение исходный текст
Ответы Re: EXPLAIN BUFFERS and I/O timing accounting questions
Re: EXPLAIN BUFFERS and I/O timing accounting questions
Список pgsql-general
Hello,

I ran across an EXPLAIN plan and had some questions about some of its details. The BUFFERS docs say

>The number of blocks shown for an upper-level node includes those used by all its child nodes.

I initially assumed this would be cumulative, but I realized it's probably not because some of the blocks affected by each child will actually overlap. But this particular plan has a Shared Hit Blocks at the root (an Aggregate) that is smaller than some of its children (three ModifyTables and a CTE Scan). This seems to contradict the documentation (since if children overlap fully in their buffers usage, the parent should still have a cost equal to the costliest child)--any idea what's up? I can send the whole plan (attached? inline? it's ~15kb) if that helps.

I also noticed the I/O Read Time (from track_io_timing) of two children in this plan is equal to the I/O Read Time in the root. Is I/O time potentially fully parallelized across children? There are no parallel workers according to the plan, so I'm surprised at this and would like to understand better.

Also, a tangential question: why is the top-level structure of a JSON plan an array? I've only ever seen one root node with a Plan key there.

Thanks,
Maciek

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: A question about sequences and backup/restore cycles
Следующее
От: Amarendra Konda
Дата:
Сообщение: Re: Too many SET TimeZone and Application_name queries