Re: current_timestamp after queries

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Guido Staub <staub(at)gik(dot)uni-karlsruhe(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: current_timestamp after queries
Date: 2002-09-30 09:55:26
Message-ID: 20020930095526.GA19086@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Sep 30, 2002 at 11:44:17AM +0200, Guido Staub wrote:

[some current_timestamp stuff]

> I think that the accuracy is not good enough because I've started two
> BEGIN statements and some time is elapsing between them. Am I right?
> Or does anybody know a better solution to store the elapsed time after
> some queries without writing some code in C or JAVA?

Perhaps you're looking for timeofday()?

kleptog=# begin; select timeofday(); select timeofday(); commit;
BEGIN
timeofday
-------------------------------------
Mon Sep 30 19:54:41.559605 2002 EST
(1 row)

timeofday
-------------------------------------
Mon Sep 30 19:54:41.560018 2002 EST
(1 row)

COMMIT

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jochem van Dieten 2002-09-30 10:19:41 Re: [JDBC] Prepared statement performance...
Previous Message Adam Witney 2002-09-30 09:48:19 Re: Beta2 - A Late Announcement

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2002-09-30 11:59:54 AIX compilation problems (was Re: Proposal ...)
Previous Message Guido Staub 2002-09-30 09:44:17 current_timestamp after queries