Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 53450632397 for ; Tue, 31 Aug 2010 16:18:59 -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 80633-02 for ; Tue, 31 Aug 2010 19:18:51 +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 F15BD632220 for ; Tue, 31 Aug 2010 16:18:51 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 31 Aug 2010 14:18:50 -0500 Message-Id: <4C7D0F490200002500034EEC@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 31 Aug 2010 14:18:49 -0500 From: "Kevin Grittner" To: ,"A J" Subject: Re: Confused by 'timing' results References: <788866.21140.qm@web120020.mail.ne1.yahoo.com> <4C7D00330200002500034ED2@gw.wicourts.gov> <19320.56933.qm@web120013.mail.ne1.yahoo.com> In-Reply-To: <19320.56933.qm@web120013.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/290 X-Sequence-Number: 35539 A J wrote: > log_min_duration_statement output should stay constant for all the > different clients across different geographic locations. I'm not sure timings there will be totally immune to network speed. The whole execution engine is designed around the top level pulling rows from other levels. If it is sending those rows over the wire as it pulls them, it could block at times, causing a delay before completion of the query. I haven't looked at the PostgreSQL wire protocol in detail, but other database products where I became familiar with the wire protocol had many round trips per query run -- making run time sensitive to the network latency. I've generally gone with a thin tier on the database server to field requests and provide responses using stream-oriented protocols with moving windows so I can keep the database protocol to the fastest, lowest latency connection I can arrange. I like to use queues in that middle tier for incoming requests and outgoing responses, to minimize the impact of network throughput and latency. -Kevin