From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql \watch versus \timing |
Date: | 2013-05-19 22:33:52 |
Message-ID: | 10853.1369002832@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeff Janes <jeff(dot)janes(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Nelson Minar | 2013-05-19 23:07:18 | Re: BUG #8167: false EINVAL -22 for opening a file |
Previous Message | Jeff Janes | 2013-05-19 20:48:23 | psql \watch versus \timing |