Re: \timing interval

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \timing interval
Date: 2016-07-09 19:09:36
Message-ID: d81d889e-610e-175c-5df8-8f209886153a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/9/16 12:59 PM, Tom Lane wrote:
> NAK --- if you're trying to do arithmetic on the numbers, converting
> them to hh:mm:ss notation isn't the best first step. I think a separate
> setting somewhere to select the format would be good. Please *don't*
> do "\timing interval" as that confuses the on/off state with the
> formatting selection. Maybe a \pset option?

I'm not quite sure what you mean by wanting to do arithmetic on the
numbers. My phrasing of the problem is that after a long query, you
might get output like this:

Time: 1234567.666 ms

which is pretty useless.

So I would like to have a format that is a bit more sensitive to the
scale of the numbers. And I would like that by default, because I don't
really want to have to fiddle with the format and then have to re-run
the long query. (Then I'd just do the division by 3600 or whatever
myself, and we haven't really improved usability.)

I'm not wedded to any particular format, but I think we can come up with
one that works in most situations.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-07-09 19:35:17 Re: \timing interval
Previous Message Pavel Stehule 2016-07-09 18:17:30 Re: \timing interval