X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DF09211F6D4D for ; Mon, 3 Apr 2006 09:50:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92312-02 for ; Mon, 3 Apr 2006 09:50:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx2.surnet.cl (mx2.surnet.cl [216.155.73.181]) by postgresql.org (Postfix) with ESMTP id 4605A11F6D1A for ; Mon, 3 Apr 2006 09:50:50 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx2.surnet.cl with ESMTP; 03 Apr 2006 08:50:48 -0400 X-IronPort-AV: i="4.02,198,1139194800"; d="scan'208"; a="40448668:sNHT19922984" Received: from alvh.no-ip.org (201.220.123.224) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 43A978FD00D241B3; Mon, 3 Apr 2006 08:50:48 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 0CE23C2DC4F; Mon, 3 Apr 2006 08:50:48 -0400 (CLT) Date: Mon, 3 Apr 2006 08:50:47 -0400 From: Alvaro Herrera To: Mario Splivalo Cc: pgsql-performance@postgresql.org Subject: Re: Measuring the execution time of functions within functions... Message-ID: <20060403125047.GA7276@surnet.cl> Mail-Followup-To: Mario Splivalo , pgsql-performance@postgresql.org References: <1144057339.20123.18.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1144057339.20123.18.camel@localhost.localdomain> User-Agent: Mutt/1.5.11+cvs20060126 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.732 required=5 tests=[AWL=0.732] X-Spam-Score: 0.732 X-Spam-Level: X-Archive-Number: 200604/22 X-Sequence-Number: 18106 Mario Splivalo wrote: > Since the function is written in plpgsql I tried to calculate the > durations by using now() function, but realized that within the > transaction now() always retunrs the same value. Maybe you can use timeofday(). -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support