pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedTrying to profile a function, but weird stuff happens
2+ messages / 2 participants
[nested] [flat]
* Trying to profile a function, but weird stuff happens
@ 2003-05-14 17:57 Ericson Smith <eric@did-it.com>
2003-05-14 18:59 ` Re: Trying to profile a function, but weird stuff happens Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Ericson Smith @ 2003-05-14 17:57 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm trying to figure out how long my function is taking to run, but it
keeps returning identical start and stop times. Here's a segment...
seg := date_part(''second'', now())::float;
FOR rec IN SELECT qcounter FROM tlogs_queue LOOP
blah, blah, blah
END LOOP;
secs := date_part(''second'', now())::float;
RAISE NOTICE ''Start %'', seg;
RAISE NOTICE ''End %'', secs;
seg and secs are the exact same number. Any pointers would be much
appreciated.
- Ericson Smith
eric@did-it.com
http://www.did-it.com
--
Ericson Smith <eric@did-it.com>
--
Ericson Smith <eric@did-it.com>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Trying to profile a function, but weird stuff happens
2003-05-14 17:57 Trying to profile a function, but weird stuff happens Ericson Smith <eric@did-it.com>
@ 2003-05-14 18:59 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-05-14 18:59 UTC (permalink / raw)
To: Ericson Smith <eric@did-it.com>; +Cc: pgsql-admin
Ericson Smith <eric@did-it.com> writes:
> I'm trying to figure out how long my function is taking to run, but it
> keeps returning identical start and stop times.
now() doesn't advance inside a transaction. See timeofday().
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-05-14 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 17:57 Trying to profile a function, but weird stuff happens Ericson Smith <eric@did-it.com>
2003-05-14 18:59 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox