Re: Planning time in explain/explain analyze - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Planning time in explain/explain analyze
Date
Msg-id CA+Tgmoarf9fnWpEDwC+8djzfWXJTuBb2jPRbNvramKPoVRb--A@mail.gmail.com
Whole thread Raw
In response to Re: Planning time in explain/explain analyze  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: Planning time in explain/explain analyze
List pgsql-hackers
On Mon, Dec 23, 2013 at 9:54 PM, Andreas Karlsson <andreas@proxel.se> wrote:
> On 12/24/2013 03:33 AM, Tom Lane wrote:
>>
>> Andreas Karlsson <andreas@proxel.se> writes:
>>>
>>> The patch does not include any changes to documentation or tests. I will
>>> fix that if people think this patch is useful.
>>
>>
>> I take it you've not tried the regression tests with this.
>
>
> Yeah, forgot to mention that we need some way to disable it in the tests.
> Either by not having it included in EXPLAIN or by adding an option to turn
> it off. Any suggestion on which would be preferable?

I would be tempted to display it only if (COSTS OFF) is not given.  As
far as I can tell, the major use case for (COSTS OFF) is when you want
the output to be stable so you can include it in a regression test.
Technically speaking, planning time is not a cost, but I'm not sure I
could live with myself if we forced everyone to write (COSTS OFF,
PLANNING_TIME OFF).  And I don't think much of the idea of only
including planning time when ANALYZE is used, because you don't have
to want to run the query to want to know how long it took to plan.

Also, +1 for this general concept.  Great idea.

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



pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: Planning time in explain/explain analyze
Next
From: Tom Lane
Date:
Subject: Re: Planning time in explain/explain analyze