From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pierre Giraud <pierre(dot)giraud(at)dalibo(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fujii Masao <fujii(at)postgresql(dot)org> |
Subject: | Re: [PG13] Planning (time + buffers) data structure in explain plan (format text) |
Date: | 2020-08-19 11:24:37 |
Message-ID: | CAApHDvonbjd1qZX44ewRKRpWaTgPh1p5H_c++6j=iF2NDPe+8Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 19 Aug 2020 at 22:39, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> so, maybe we can just error if analyze == off AND buffers == on AND
> summary == off. We likely should pay attention to analyze there as it
> seems perfectly fine to EXPLAIN (ANALYZE, BUFFERS, SUMMARY off). We
> quite often do SUMMARY off for the regression tests... I think that
> might have been why it was added in the first place.
I had something like the attached in mind.
postgres=# explain (buffers) select * from t1 where a > 4000000;
QUERY PLAN
--------------------------------------------------------------------------
Index Only Scan using t1_pkey on t1 (cost=0.42..10.18 rows=100 width=4)
Index Cond: (a > 4000000)
Planning Time: 13.341 ms
Buffers: shared hit=2735
(4 rows)
It does look a bit weirder if the planner didn't do any buffer work:
postgres=# explain (buffers) select * from pg_class;
QUERY PLAN
--------------------------------------------------------------
Seq Scan on pg_class (cost=0.00..443.08 rows=408 width=768)
Planning Time: 0.136 ms
(2 rows)
but that's not a combination that people were able to use before, so I
think it's ok to show the planning time there.
David
Attachment | Content-Type | Size |
---|---|---|
explain_buffers_without_analyze.patch | application/octet-stream | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2020-08-19 11:41:41 | Re: Optimising compactify_tuples() |
Previous Message | David Rowley | 2020-08-19 10:39:49 | Re: [PG13] Planning (time + buffers) data structure in explain plan (format text) |