X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 772FF9FA5C3 for ; Wed, 19 Jul 2006 03:30:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 75858-07 for ; Wed, 19 Jul 2006 03:30:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx00.ext.bfk.de (mx00.ext.bfk.de [217.29.46.125]) by postgresql.org (Postfix) with ESMTP id 903EA9FA430 for ; Wed, 19 Jul 2006 03:30:22 -0300 (ADT) Received: from fweimer by bfk.de with local id 1G35ZW-0001gr-3Y; Wed, 19 Jul 2006 08:30:14 +0200 To: Cc: , "Guoping Zhang (E-mail)" Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance? References: <003401c6aaf5$c8c2d900$74304c93@eddy> From: Florian Weimer Date: Wed, 19 Jul 2006 08:30:14 +0200 In-Reply-To: <003401c6aaf5$c8c2d900$74304c93@eddy> (Guoping Zhang's message of "Wed, 19 Jul 2006 15:40:02 +1000") Message-ID: <82irlu2jk9.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/190 X-Sequence-Number: 20050 * Guoping Zhang: > a) Anyone has the similar experience? How do you deal with it? > b) Why TCP stack imposes such big delay? any tuning point I shall do? If you use INSERT, you'll incur a network round-trip delay for each record. Try using COPY FROM instead, possibly to a temporary table if you need more complex calculations. If you do this, there won't be a huge difference between local and remote access as long as the bandwidth is sufficient. -- Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Durlacher Allee 47 tel: +49-721-96201-1 D-76131 Karlsruhe fax: +49-721-96201-99