Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 967F19FB1DC for ; Wed, 7 Feb 2007 14:41:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 21654-02 for ; Wed, 7 Feb 2007 14:41:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id 1D68B9FA4CD for ; Wed, 7 Feb 2007 14:41:12 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HErv8-0003lR-Ad for pgsql-admin@postgresql.org; Wed, 07 Feb 2007 13:53:30 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 909F43FAF; Wed, 7 Feb 2007 13:41:06 -0500 (EST) Date: Wed, 7 Feb 2007 13:41:06 -0500 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: Measuring statement runtime? Message-ID: <20070207184106.GA31198@phlogiston.dyndns.org> References: <95626.55484.qm@web34201.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95626.55484.qm@web34201.mail.mud.yahoo.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/111 X-Sequence-Number: 24576 On Wed, Feb 07, 2007 at 09:00:32AM -0800, Andrew Edson wrote: > What is the command I should be looking for to measure the > runtime on my statements? In psql, use \timing. In your postgresql.conf file, you can set log_min_duration_statement=0. You can also use EXPLAIN ANALYSE to see the full execution plan, plus information about how long each step _actually_ takes. A -- Andrew Sullivan | ajs@crankycanuck.ca Users never remark, "Wow, this software may be buggy and hard to use, but at least there is a lot of code underneath." --Damien Katz