Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9067F634C45 for ; Tue, 31 Aug 2010 15:16:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 16296-06-4 for ; Tue, 31 Aug 2010 18:16:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 0BA1A63555D for ; Tue, 31 Aug 2010 15:14:31 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 31 Aug 2010 13:14:31 -0500 Message-Id: <4C7D00330200002500034ED2@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 31 Aug 2010 13:14:27 -0500 From: "Kevin Grittner" To: ,"A J" Subject: Re: Confused by 'timing' results References: <788866.21140.qm@web120020.mail.ne1.yahoo.com> In-Reply-To: <788866.21140.qm@web120020.mail.ne1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/288 X-Sequence-Number: 35537 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