Re: Patch: add timing of buffer I/O requests

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: add timing of buffer I/O requests
Date: 2012-04-10 18:10:03
Message-ID: 12671.1334081403@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Apr 10, 2012 at 1:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The business about underlying microseconds is maybe not so good, but
>> I don't think we want to touch that right now. In the long run
>> I think it would make sense to converge on float8 msec as being the
>> standard for exposed timing values, because that is readily adaptable to
>> the underlying data having nsec or even better precision.

> Hmm. Maybe we should think about numeric ms, which would have all the
> same advantages but without the round-off error.

Color me unimpressed ... numeric calculations are vastly more expensive
than float, and where are you going to get timing data that has more
than sixteen decimal digits of accuracy? IME we're lucky to get three
repeatable digits in any timing measurement. The point of using a
non-integer type here is not so much precision as dynamic range:
sometimes you might be measuring queries that run for hours, and other
times ones that run for microseconds. In the latter case it's important
to be able to represent nanoseconds, but not so much in the former.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-04-10 18:35:44 Re: plpython triggers are broken for composite-type columns
Previous Message ktm@rice.edu 2012-04-10 18:07:21 Re: Patch: add timing of buffer I/O requests