On 2014-06-03 15:08:15 -0400, Tom Lane wrote: > Andres Freund <and...@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.
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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers