From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Hide 'Execution time' in EXPLAIN (COSTS OFF) |
Date: | 2014-06-03 19:13:18 |
Message-ID: | 20140603191318.GV24145@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-06-03 15:08:15 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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.
It's not what I'd have choosen when starting afresh, but as you say...
> 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.
The specific case I wanted it for was to test that a CREATE INDEX in a
specific situation actually has indexed a recently dead row. That can be
made visible via bitmap index scans... Generally index vs heap cases
aren't that easy to check with just the toplevel result.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-06-03 19:40:27 | Re: Hide 'Execution time' in EXPLAIN (COSTS OFF) |
Previous Message | Tom Lane | 2014-06-03 19:08:15 | Re: Hide 'Execution time' in EXPLAIN (COSTS OFF) |