Re: Planning time in explain/explain analyze

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planning time in explain/explain analyze
Date: 2014-01-29 20:01:01
Message-ID: CA+Tgmob6yNXAMda0n6LoGcQYucPranZdTboP1GVTOPR4=_edjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 29, 2014 at 2:21 PM, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
> On 01/28/2014 09:39 PM, Tom Lane wrote:
>>
>> I'm for doing the measurement in ExplainOneQuery() and not printing
>> anything in code paths that don't go through there.
>
> Reading the discussion here and realizing that my last patch was wrong I am
> now in agreement with this. I have attached a patch which no longer tries to
> measure planning time for prepared statements.

Cool. I propose adding one parameter rather than two to
ExplainOnePlan() and making it of type instr_time * rather than
passing an instr_time and a bool. If you don't want to include the
planning time, pass NULL; if you do, pass a pointer to the instr_time
you want to print. I think that would come out slightly neater than
what you have here.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-01-29 20:07:47 Re: Add min and max execute statement time in pg_stat_statement
Previous Message Christian Kruse 2014-01-29 19:59:30 Re: [PATCH] Use MAP_HUGETLB where supported (v3)