Trying to profile a function, but weird stuff happens

From: Ericson Smith <eric(at)did-it(dot)com>
To: PostgreSQL Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Trying to profile a function, but weird stuff happens
Date: 2003-05-14 17:57:06
Message-ID: 1052935026.11798.18.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)did-it(dot)com
http://www.did-it.com

--
Ericson Smith <eric(at)did-it(dot)com>
--
Ericson Smith <eric(at)did-it(dot)com>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-05-14 18:59:33 Re: Trying to profile a function, but weird stuff happens
Previous Message Andrew Sullivan 2003-05-14 17:48:59 Re: No flamefest please, MySQL vs. PostgreSQL AGAIN