pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Smith <greg@2ndQuadrant.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: Clarify TIMING OFF behavior
Date: Sun, 19 May 2013 22:06:20 -0400
Message-ID: <13411.1369015580@sss.pgh.pa.us> (raw)
In-Reply-To: <51985D31.1030705@2ndQuadrant.com>
References: <51985D31.1030705@2ndQuadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Greg Smith <greg@2ndQuadrant.com> writes:
> While chatting in #pedant today, I noticed that it's not clear that 
> EXPLAIN (ANALYZE ON, TIMING OFF) will still collect the total runtime of 
> the statement.  Attached patch clarifies that.  It also comments why the 
> related code runs INSTR_TIME_SET_CURRENT in all cases.  That's actually 
> how I noticed that--a read through explain.c now could rightly wonder 
> "why is it still collecting that bit of time info when TIMING is off?"

Applied with a little bit of further wordsmithing.

> There's an argument possible here that a third TIMING option besides 
> ON/OFF should really exist, one that really doesn't do any timing at 
> all.  I don't think enough use cases for that exist to justify coding 
> it.

Agreed.  If you can't tolerate two gettimeofday calls per EXPLAIN,
you don't need a new EXPLAIN option ... you need new hardware.

			regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (2+ messages)

Message-ID: <13411.1369015580@sss.pgh.pa.us>
Permalink:  ../13411.1369015580@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13411.1369015580@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, greg@2ndQuadrant.com
  Subject: Re: Clarify TIMING OFF behavior
  In-Reply-To: <13411.1369015580@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox