Re: psql \watch versus \timing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql \watch versus \timing
Дата
Msg-id 10853.1369002832@sss.pgh.pa.us
обсуждение исходный текст
Ответ на psql \watch versus \timing  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: psql \watch versus \timing
Список pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> I'd like to run same query repeatedly and see how long it takes each time.
> I thought \watch would be excellent for this, but it turns out that using
> \watch suppresses the output of \timing.

> Is this intentional, or unavoidable?

\watch uses PSQLexec not SendQuery; the latter implements \timing which
I agree is arguably useful here, but also autocommit/auto-savepoint
behavior which probably isn't a good idea.

It might be a good idea to refactor those two routines into one routine
with some sort of bitmap flags argument to control the various add-on
behaviors, but that seems like not 9.3 material anymore.

> Also, is it just or does the inability to watch more frequently than once a
> second make it a lot less useful than it could be?

It did not seem that exciting to me.  In particular, we've already found
out that \watch with zero delay is a pretty bad idea, so you'd have to
make a case for what smaller minimum to use if it's not to be 1 second.
        regards, tom lane



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: psql \watch versus \timing
Следующее
От: Chris Farmiloe
Дата:
Сообщение: ASYNC Privileges proposal