Skip site navigation (1) Skip section navigation (2)

now() gives same time within the session

From: <Atul(dot)Goel(at)globaldatapoint(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: now() gives same time within the session
Date: 2010-07-12 11:00:00
Message-ID: 418EC9BD4D7125488CCAC5C7C559A24803A9D0@MS10.lsc.net (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

I need to log the start and end time of the procedures in a table. But the start and end time are same. This is how I recreated the issue.

create table test_time (time timestamp);
delete from  test_time;
insert into test_time select now();
SELECT pg_sleep(10);
insert into test_time select now();
SELECT pg_sleep(10);
insert into test_time select now();
SELECT pg_sleep(10);
insert into test_time select now();
SELECT pg_sleep(10);
select * from test_time;

"2010-07-12 12:43:40.509746"
"2010-07-12 12:43:40.509746"
"2010-07-12 12:43:40.509746"
"2010-07-12 12:43:40.509746"

Atul Goel
SENIOR DEVELOPER

Global DataPoint
Middlesex House, 34-42 Cleveland Street
London W1T 4LB, UK
T: +44 (0)20 7079 4827
M: +44 (0)7846765098
www.globaldatapoint.com<http://www.globaldatapoint.com/>

This e-mail is confidential and should not be used by anyone who is not the original intended recipient. Global DataPoint Limited does not accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of Global DataPoint Limited. No contracts may be concluded on behalf of Global DataPoint Limited by means of e-mail communication. Global DataPoint Limited Registered in England and Wales with registered number 3739752 Registered Office Middlesex House, 34-42 Cleveland Street, London W1T 4LB

Responses

pgsql-performance by date

Next:From: A. KretschmerDate: 2010-07-12 11:15:00
Subject: Re: now() gives same time within the session
Previous:From: Craig RingerDate: 2010-07-12 10:58:44
Subject: Re: Pooling in Core WAS: Need help in performance tuning.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group