Re: EXPLAIN BUFFERS
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Euler Taveira de Oliveira <euler@timbira.com>
Cc: Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>, Greg Smith <greg@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@commandprompt.com>, Jeff Janes <jeff.janes@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2009-12-12T02:22:11Z
Lists: pgsql-hackers
Attachments
- explain_buffers_20091211_rmh2.patch (text/x-diff) patch
On Fri, Dec 11, 2009 at 11:36 AM, Euler Taveira de Oliveira <euler@timbira.com> wrote: > Robert Haas escreveu: >> On Thu, Dec 10, 2009 at 9:35 PM, Takahiro Itagaki >> <itagaki.takahiro@oss.ntt.co.jp> wrote: >>> Anyway, a revised patch according to the comments is attached. >>> The new text format is: >>> Buffers: shared hit=675 read=968, temp read=1443 written=1443 >>> * Zero values are omitted. (Non-text formats could have zero values.) >>> * Rename "Blocks:" to "Buffers:". >>> * Remove parentheses and add a comma between shared, local and temp. >> >> I did a bit of copy-editing of your doc changes to make the English a >> bit more correct and idiomatic. Slightly revised patch attached for >> your consideration. The output format looks really nice (thanks for >> bearing with me), and the functionality is great. >> > Please, document that zero values are omitted in the text format. It seems > intuitive but could be surprise because zero values are in non-text formats. OK, done, see attached. I also noticed when looking through this that the documentation says that auto_explain.log_buffers is ignored unless auto_explain.log_analyze is set. That is true and seems right to me, but for some reason explain_ExecutorEnd() had been changed to set es.analyze if either log_analyze or log_buffers was set. It actually didn't have any effect unless log_analyze was set, but only because explain_ExecutorStart doesn't set queryDesc->doInstrument in that case. So I've reverted that here for clarity. ...Robert