EXPLAIN BUFFERS

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: EXPLAIN BUFFERS
Date: 2009-10-15 11:29:44
Message-ID: 20091015201252.A2EC.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> In this case, I think that the auto_explain changes out to be part of
> the same patch as the core EXPLAIN changes

Here is a rewritten patch to add EXPLAIN (ANALYZE, BUFFERS) and
support for it by contrib/auto_explain. I removed pg_stat_statements
support from the patch for now.

I modifed heavily in buffer statistics conters; These counters are
put all together into struct BufferUsage. The struct is also used in
struct Instrumentation. The global buffer usage counters are saved
into 'bufusage_start' field at the InstrStartNode(), and accumulated
into 'bufusage' field and global counters are reset at InstrStopNode().

EXPLAIN BUFFERS only shows 'hit', 'read' and 'temp read' in text format
to fit in display, but xml or json format contains all of them.

I removed ShowBufferUsage() because we can retrieve the same information
from xml or json explain output, but the patch does not drop
log_statement_stats variable families nor ShowUsage() functions.
We could also remove all of them if no one use them at all.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment Content-Type Size
explain_buffers_20091015.patch application/octet-stream 20.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2009-10-15 11:49:09 Re: ECPG: store own copy of the prepared statement name
Previous Message Michael Meskes 2009-10-15 10:21:24 Re: ECPG: store own copy of the prepared statement name