Re: Hide 'Execution time' in EXPLAIN (COSTS OFF) - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)
Date
Msg-id 20140920201330.GB17898@msg.df7cb.de
Whole thread Raw
In response to Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Re: Andres Freund 2014-06-04 <20140604194544.GB785@awork2.anarazel.de>
> > I'm unconvinced that this'd add much to our regression testing capability,
> > though.  The standard thing is to do an EXPLAIN to check the plan shape
> > and then run the query to see if it gets the right answer.  Checking row
> > counts is pretty well subsumed by the latter, and is certainly not an
> > adequate substitute for it.
> > 
> > So on the whole, -1 ... this is an unintuitive and
> > non-backwards-compatible change that doesn't look like it buys much.
> 
> I've added the regression test I want this for.
> 
> 0001 is the bugfix making me look into it
> 0002 is COSTS OFF removing the display of execution time
> 0003 is the regression test
> 
> Note that 0003 will require a kill -9 without 0001.
> 
> I am not sure myself if the test is really worth it. On one hand it's an
> area that had seen several hard to find bugs over the years and is
> likely to see further changes (e.g. CSN stuff) in the near future, on
> the other hand the tests are tricky and require specific ordering.

Hi,

there's another problem in this area: 9.4 adds "Planning time" to the
EXPLAIN output. If you don't want to see that, you need to use (costs
off), but this, well, also disables the costs. If you are running
regression tests to actually test the costs, you've lost in 9.4.

This problem just emerged in the Multicorn FDW where the regression
tests were monitoring the costs, but in 9.4 (costs off) kills that.

https://github.com/Kozea/Multicorn/pull/7

Can we have "EXPLAIN (timing off)" in 9.4+ hide the "Planning time"
line? That would even be backwards compatible with 9.x where it would
be a no-op.

(I don't have an opinion how much this should affect the "EXPLAIN
(analyze, timing off)" output, but there's probably a sane solution.)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: RLS Design
Next
From: bill wilson
Date:
Subject: conditional query in where has name collision. bug?