X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D542B5651C for ; Fri, 11 Mar 2005 18:48:29 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34045-07 for ; Fri, 11 Mar 2005 18:48:20 +0000 (GMT) Received: from mesagate.talleyds.com (unknown [207.114.138.130]) by svr1.postgresql.org (Postfix) with ESMTP id 35C0F563DE for ; Fri, 11 Mar 2005 18:48:18 +0000 (GMT) Received: from TDS-MTA by mesagate.talleyds.com with Novell_GroupWise; Fri, 11 Mar 2005 11:48:19 -0700 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.4 Date: Fri, 11 Mar 2005 11:47:54 -0700 From: "Lou O'Quin" To: Subject: Query performance Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part361548CA.0__=" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.505 tagged_above=0 required=5 tests=HTML_20_30, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200503/191 X-Sequence-Number: 10896 --=__Part361548CA.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable As a test, I ran a query in the pgAdmin query tool, which returns about = 15K records from a PostgreSQL v8.01 table on my Win2K server. I ran the same query from the local server, from another PC on the same = 100 mbit local network, and from a PC on a different network, over the = internet.=20 The times for the query to run and the data to return for each of the = three=20 locations are shown here: Local Server : 571+521 ms Local network: = 1187+1266 ms Internet:14579+4016 msMy question is this: Why does the = execution time for the query to run increase so much? Since the query = should be running on the server, it's time should be somewhat independent = of the network transport delay. (unlike the data transport time) However, = it appears to actually be hypersensitive to the transport delay. The = ratios of time for the data transport (assuming 1 for the local server) = are: 1 : 2.43 : 7.71 whereas the query execution time ratios are: 1 : 2.08 : 25.5 (!!!) Obviously, the transport times will be greater. But why does the = execution time bloat so? --=__Part361548CA.0__= Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML As a = test, I ran a query in the pgAdmin query tool, which returns about 15K = records from a PostgreSQL v8.01 table on my Win2K server.

I ran the = same query from the local server, from another PC on the same 100 mbit = local network, and from a PC on a different network, over the internet. =

The times for the query to run and the data to return for each of = the three
locations are shown here:=20
  • Local Server : 571+521 ms=20
  • Local network: 1187+1266 ms=20
  • Internet:14579+4016 ms
My question is this: Why does the = execution time for the query to run increase so much? Since the query = should be running on the server, it's time should be somewhat = independent of the network transport delay. (unlike the data transport = time) However, it appears to actually be hypersensitive to the transport = delay. The ratios of time for the data transport (assuming 1 for the local = server) are:
1 : 2.43 : 7.71

whereas the query execution = time ratios are:
1 : 2.08 : 25.5  (!!!)

Obviousl= y, the transport times will be greater.  But why does the execution = time bloat so? --=__Part361548CA.0__=--