X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 88370528AD for ; Mon, 27 Jun 2005 22:34:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66697-05 for ; Tue, 28 Jun 2005 01:34:22 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id AB72D52828 for ; Mon, 27 Jun 2005 22:34:20 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j5S1YKkY084461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Jun 2005 19:34:22 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j5S1YKSI017486; Mon, 27 Jun 2005 19:34:20 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j5S1YJLS017485; Mon, 27 Jun 2005 19:34:19 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 27 Jun 2005 19:34:19 -0600 From: Michael Fuhr To: "Karl O. Pinc" Cc: pgsql-performance@postgresql.org Subject: Re: Performance analysis of plpgsql code Message-ID: <20050628013419.GA17407@winnie.fuhr.org> References: <1119915045l.4428l.5l@mofo> <20050627233303.GA17069@winnie.fuhr.org> <1119923648l.11411l.0l@mofo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1119923648l.11411l.0l@mofo> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/513 X-Sequence-Number: 13150 On Tue, Jun 28, 2005 at 01:54:08AM +0000, Karl O. Pinc wrote: > On 06/27/2005 06:33:03 PM, Michael Fuhr wrote: > > >See timeofday(). > > That only gives you the time at the start of the transaction, > so you get no indication of how long anything in the > transaction takes. Did you read the documentation or try it? Perhaps you're thinking of now(), current_timestamp, and friends, which don't advance during a transaction; but as the documentation states, "timeofday() returns the wall-clock time and does advance during transactions." I just ran tests on versions of PostgreSQL going back to 7.2.8 and in all of them timeofday() advanced during a transaction. Does it not work on your system? If not then something's broken -- what OS and version of PostgreSQL are you using? -- Michael Fuhr http://www.fuhr.org/~mfuhr/