Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A13526329D6 for ; Tue, 31 Aug 2010 16:01:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 00343-05 for ; Tue, 31 Aug 2010 19:01:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from n6-vm0.bullet.mail.gq1.yahoo.com (n6-vm0.bullet.mail.gq1.yahoo.com [98.137.26.79]) by mail.postgresql.org (Postfix) with SMTP id 0ACB86328F4 for ; Tue, 31 Aug 2010 16:01:38 -0300 (ADT) Received: from [67.195.9.82] by n6.bullet.mail.gq1.yahoo.com with NNFMP; 31 Aug 2010 19:01:37 -0000 Received: from [98.137.27.212] by t2.bullet.mail.gq1.yahoo.com with NNFMP; 31 Aug 2010 19:01:37 -0000 Received: from [127.0.0.1] by omp122.mail.gq1.yahoo.com with NNFMP; 31 Aug 2010 19:01:37 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 485657.45985.bm@omp122.mail.gq1.yahoo.com Received: (qmail 57128 invoked by uid 60001); 31 Aug 2010 19:01:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1283281297; bh=yLQGZfgQYo6ThAEK7//U7hTRCxGZ7bkIpt+uYtXyHto=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=43nOeaGm8OAmcjZ8PQFJb8/zCst/st8XsPtK9PwalqqH7Z1ZTDiq+YQi/GrpmbfEcFtMLD/P7TqxS+yXYIBhYV7N06fkKXVbkKHFTzhH+Aolb/JSXD6bjtWMoXvrWoLJSYwJWM+AqBYokotZ1i33bwfe+j63J4Ntp6WgU7CJ8l8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=igvCFvF8B16PDk0LCvkbQn27D0oL1lfdMaYcBAl8YSVW1AyJxdK0KMVARu2PcIY2a3SYHvW9Q/T8fqW2+qKV2B/qKxtesT2uGuBYrBVY7rCPxmot85W2BMWuchEbPyyyen0iOkTSohjJRp7zLF99ZsIbNtTyQxOzdh85olfuoJw=; Message-ID: <19320.56933.qm@web120013.mail.ne1.yahoo.com> X-YMail-OSG: HpnG6CsVM1l4T.QWA681ER0vhZyBe8PBS38cU.YeE_8qK.5 yInHQD46d1lul7Fobtf.pSP3PqmuglcCrzFxFZVGgoSf1vj9MDEPVyJ13Nb5 Z2J8UoOwrIaOWTdhA2wkxqHaqUU0N1QuykNcKfxW_ASewGW9Rbqi94Qkh8N. tndI_KEEn8Tg3ieNBDHJaP0oKtO2zW7y0jMPhs8Yj1U3wZ_jguiD4KAyieJd rlikwpRd0X2iCGj0zng-- Received: from [129.44.63.215] by web120013.mail.ne1.yahoo.com via HTTP; Tue, 31 Aug 2010 12:01:36 PDT X-Mailer: YahooMailRC/470 YahooMailWebService/0.8.105.279950 References: <788866.21140.qm@web120020.mail.ne1.yahoo.com> <4C7D00330200002500034ED2@gw.wicourts.gov> Date: Tue, 31 Aug 2010 12:01:36 -0700 (PDT) From: A J Subject: Re: Confused by 'timing' results To: Kevin Grittner , pgsql-admin@postgresql.org In-Reply-To: <4C7D00330200002500034ED2@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-838571716-1283281296=:56933" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/289 X-Sequence-Number: 35538 --0-838571716-1283281296=:56933 Content-Type: text/plain; charset=us-ascii OK, thanks Kevin. So to measure just the time take by database server, I guess I need to set the log_min_duration_statement and log_statement parameters in postgresql.conf log_min_duration_statement output should stay constant for all the different clients across different geographic locations. ________________________________ From: Kevin Grittner To: pgsql-admin@postgresql.org; A J Sent: Tue, August 31, 2010 2:14:27 PM Subject: Re: [ADMIN] Confused by 'timing' results A J wrote: > time echo '\timing \\select * from table1 where id = 123;' | psql > In the above query. the 'timing' will time the database time and > the 'time' command at the very start will time the complete time > for the query including network time. No, the 'timing' will say how long it took to send the query from psql to the server and get the complete response back from the server. The 'time' command will also include the time to start psql, establish the connection to the database, read from the pipe, and close the connection to the database. -Kevin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin --0-838571716-1283281296=:56933 Content-Type: text/html; charset=us-ascii
OK, thanks Kevin. So to measure just the time take by database server, I guess I need to set the log_min_duration_statement and log_statement parameters in postgresql.conf
log_min_duration_statement output should stay constant for all the different clients across different geographic locations.


From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org; A J <s5aly@yahoo.com>
Sent: Tue, August 31, 2010 2:14:27 PM
Subject: Re: [ADMIN] Confused by 'timing' results

A J <s5aly@yahoo.com> wrote:

> time echo '\timing \\select * from  table1 where id = 123;' | psql

> In the above query. the 'timing' will time the database time and
> the 'time' command at the very start will time the complete time
> for the query including network time.

No, the 'timing' will say how long it took to send the query from
psql to the server and get the complete response back from the
server.  The 'time' command will also include the time to start
psql, establish the connection to the database, read from the pipe,
and close the connection to the database.

-Kevin

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

--0-838571716-1283281296=:56933--