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 AC5909FA666 for ; Wed, 19 Jul 2006 12:49:23 -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 30754-04 for ; Wed, 19 Jul 2006 12:49:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from joeconway.com (wsip-68-15-9-201.sd.sd.cox.net [68.15.9.201]) by postgresql.org (Postfix) with ESMTP id 8B1859FA47F for ; Wed, 19 Jul 2006 12:49:18 -0300 (ADT) Received: from [206.190.70.130] (account jconway HELO [172.16.1.115]) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 4055890; Wed, 19 Jul 2006 08:49:17 -0700 Message-ID: <44BE547D.1000602@joeconway.com> Date: Wed, 19 Jul 2006 08:49:17 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Frost CC: Guoping Zhang , 'Florian Weimer' , pgsql-performance@postgresql.org Subject: Re: Performance penalty for remote access of postgresql References: <82irlu2jk9.fsf@mid.bfk.de> <003501c6ab05$a4978f20$74304c93@eddy> <20060719140135.GE20016@kenobi.snowman.net> In-Reply-To: <20060719140135.GE20016@kenobi.snowman.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/197 X-Sequence-Number: 20057 Stephen Frost wrote: > * Guoping Zhang (guoping.zhang@nec.com.au) wrote: > >>Obviously, if there is no better solution, the TCP round trip penalty will >>stop us doing so as we do have performance requirement. > > Actually, can't you stick multiple inserts into a given 'statement'? > ie: insert into abc (123); insert into abc (234); > > I'm not 100% sure if that solves the round-trip issue, but it might.. > Also, it looks like we might have multi-value insert support in 8.2 (I > truely hope so anyway), so you could do something like this: > insert into abc (123),(234); Yeah, see my post from last night on PATCHES. Something like "insert into abc (123); insert into abc (234); ..." actually seems to work pretty well as long as you don't drive the machine into swapping. If you're doing a very large number of INSERTs, break it up into bite-sized chunks and you should be fine. Joe