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

From Tom Lane
Subject Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)
Date
Msg-id 20067.1401822495@sss.pgh.pa.us
Whole thread Raw
In response to Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Andres Freund <andres@2ndquadrant.com>)
Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Robert Haas <robertmhaas@gmail.com>)
Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> In 9.4. COSTS OFF for EXPLAIN prevents 'Planning time' to be
> printed. Should we perhaps do the same for 'Execution time'? That'd make
> it possible to use EXPLAIN (ANALYZE, COSTS OFF, TIMING OFF) in
> regression tests.

> Currently the output for that is:
> postgres=# EXPLAIN (ANALYZE, TIMING OFF, COSTS OFF) SELECT 1;
>            QUERY PLAN
> --------------------------------
>  Result (actual rows=1 loops=1)
>  Total runtime: 0.035 ms
> (2 rows)

> Leaving off the total runtime doesn't seem bad to me.

It seems a little weird to call it a "cost" ... but maybe that
ship has sailed given how we're treating the planning-time item.

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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: David G Johnston
Date:
Subject: Re: idle_in_transaction_timeout
Next
From: Andres Freund
Date:
Subject: Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)