Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4FD1A650384 for ; Wed, 3 Dec 2008 15:31:06 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70600-01 for ; Wed, 3 Dec 2008 15:31:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by mail.postgresql.org (Postfix) with ESMTP id 6838E650381 for ; Wed, 3 Dec 2008 15:31:03 -0400 (AST) Received: by wf-out-1314.google.com with SMTP id 25so3712433wfc.28 for ; Wed, 03 Dec 2008 11:31:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=ZbPrhAbEXkPoPmO4nq1ioO+vz3ac5Q/4Qz/pCWaRm34=; b=oJxSvkj/FEXnscXTNAJS0K+pl2+d8rAJO/w14XJdOG3PRA+rL2JgMlT9jLiOrzp3j6 kd7y8KeswOxwVVsHPE76OxZt3xXAfFJPRnGdNBWmAcfbwxzQAHLa5Kuu2bRA9TeWfGqI XJXnxCbaewuWBgB0PTS8+9MmYJWzIZilPhHRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=IyaEbmrRhYBXMQBVsgDwIAF67wA2s6BYdX6LzYJD3LhdwcB2dJVCuNIrw83pQPAnwq nXluAX5B95DznRvRUVeWepoqKvUnF/YGqjPHOad9Yh/+7W/bivPN6JZhuoDf308LHPlL 7tlFVJGCP2hGPs2zmx49xRtDoxJe1T0GPd/4o= Received: by 10.141.152.9 with SMTP id e9mr6461483rvo.189.1228332662121; Wed, 03 Dec 2008 11:31:02 -0800 (PST) Received: by 10.141.52.12 with HTTP; Wed, 3 Dec 2008 11:31:02 -0800 (PST) Message-ID: Date: Wed, 3 Dec 2008 14:31:02 -0500 From: "Kynn Jones" To: pgsql-performance@postgresql.org Subject: How to profile an "SQL script"? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_119331_13883782.1228332662123" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200812/28 X-Sequence-Number: 32064 ------=_Part_119331_13883782.1228332662123 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi. I have a longish collection of SQL statements stored in a file that I run periodically via cron. Running this "script" takes a bit too long, even for a cron job, and I would like to streamline it. Is there a way to tell Postgres to print out, after each SQL statement is executed, how long it took to execute? Thanks! Kynn ------=_Part_119331_13883782.1228332662123 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi.  I have a longish collection of SQL statements stored in a file that I run periodically via cron.  Running this "script" takes a bit too long, even for a cron job, and I would like to streamline it.

Is there a way to tell Postgres to print out, after each SQL statement is executed, how long it took to execute?

Thanks!

Kynn

------=_Part_119331_13883782.1228332662123--