Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)
Дата
Msg-id 20140604194544.GB785@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)
Список pgsql-hackers
On 2014-06-03 15:08:15 -0400, Tom Lane wrote:
> 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.

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.

Opinions?

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Sigh, we need an initdb
Следующее
От: Andres Freund
Дата:
Сообщение: Re: recovery testing for beta