st 13. 11. 2019 v 11:39 odesílatel Julien Rouhaud <rjuju123@gmail.com> napsal:
(moved to -hackers)
On Tue, Nov 12, 2019 at 9:55 PM Andres Freund <andres@anarazel.de> wrote: > > This last point is more oriented towards other PG developers: I wonder > if we ought to display buffer statistics for plan time, for EXPLAIN > (BUFFERS). That'd surely make it easier to discern cases where we > e.g. access the index and scan a lot of the index from cases where we > hit some CPU time issue. We should easily be able to get that data, I > think, we already maintain it, we'd just need to compute the diff > between pgBufferUsage before / after planning.
That would be quite interesting to have. I attach as a reference a quick POC patch to implement it:
Note that there's a related discussion in the "Planning counters in pg_stat_statements" thread, on whether to also compute buffers from planning or not.