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

From Andreas Karlsson
Subject Re: Planning time in explain/explain analyze
Date
Msg-id 52E698CA.8070706@proxel.se
Whole thread Raw
In response to Re: Planning time in explain/explain analyze  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 01/13/2014 09:48 PM, Robert Haas wrote:
> What I'm saying is that if EXPLAIN reports something that's labelled
> "Planning Time", it should *be* the planning time, and not anything
> else.  When we retrieve a plan from cache, it would be sensible not to
> report the planning time at all, and IMHO it would also be sensible to
> report the time it actually took to plan whenever we originally did
> it.  But reporting a value that is not the planning time and calling
> it the planning time does not seem like a good idea to me.

Here is a patch which only prints when "Planning time" when a prepared
statment actually planned a query. I do not really like how I check for
if it was replanned, but I tried to avoid making changes in plancache.c.

Does this idea look ok?

--
Andreas Karlsson

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fwd: Request for error explaination || Adding a new integer in indextupleData Structure
Next
From: Stephen Frost
Date:
Subject: Re: A better way than tweaking NTUP_PER_BUCKET