Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeFUa-0006fT-3I for pgsql-docs@arkaria.postgresql.org; Mon, 20 May 2013 02:06:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UeFUZ-0003Xn-KQ for pgsql-docs@arkaria.postgresql.org; Mon, 20 May 2013 02:06:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeFUY-0003Xh-Pk for pgsql-docs@postgresql.org; Mon, 20 May 2013 02:06:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeFUV-0000dA-LI for pgsql-docs@postgresql.org; Mon, 20 May 2013 02:06:26 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r4K26KWq013412; Sun, 19 May 2013 22:06:20 -0400 (EDT) From: Tom Lane To: Greg Smith cc: pgsql-docs Subject: Re: Clarify TIMING OFF behavior In-reply-to: <51985D31.1030705@2ndQuadrant.com> References: <51985D31.1030705@2ndQuadrant.com> Comments: In-reply-to Greg Smith message dated "Sun, 19 May 2013 01:03:45 -0400" Date: Sun, 19 May 2013 22:06:20 -0400 Message-ID: <13411.1369015580@sss.pgh.pa.us> X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Greg Smith 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