Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6A32F9FB88A for ; Fri, 25 May 2007 11:07:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 76873-06 for ; Fri, 25 May 2007 11:07:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 221E09FB851 for ; Fri, 25 May 2007 11:07:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l4PE7ECD008449; Fri, 25 May 2007 10:07:14 -0400 (EDT) To: ptb@inv.it.uc3m.es cc: pgsql-performance@postgresql.org Subject: Re: general PG network slowness (possible cure) (repost) In-reply-to: <200705250850.l4P8owm02940@inv.it.uc3m.es> References: <200705250850.l4P8owm02940@inv.it.uc3m.es> Comments: In-reply-to "Peter T. Breuer" message dated "Fri, 25 May 2007 10:50:58 +0200" Date: Fri, 25 May 2007 10:07:14 -0400 Message-ID: <8448.1180102034@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/506 X-Sequence-Number: 24896 "Peter T. Breuer" writes: > Soooo ... I took a look at my implementation of remote gdbm, and did > a very little work to aggregate outgoing transmissions together into > lumps. We do that already --- for a simple query/response such as you are describing, each query cycle will involve one physical client->server message followed by one physical server->client message. The only way to aggregate more is for the application code to merge queries together. Migrating a dbm-style application to a SQL database is often a real pain, precisely because the application is designed to a mindset of "fetch one record, manipulate it, update it", where "fetch" and "update" are assumed to be too stupid to do any of the work for you. The way to get high performance with a SQL engine is to push as much of the work as you can to the database side, and let the engine process multiple records per query; and that can easily mean rewriting the app from the ground up :-( regards, tom lane