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 9DDA59FA47F for ; Wed, 19 Jul 2006 11:26:56 -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 12459-03 for ; Wed, 19 Jul 2006 11:26:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from kenobi.snowman.net (kenobi.snowman.net [70.84.9.186]) by postgresql.org (Postfix) with ESMTP id D5BD99FA4A8 for ; Wed, 19 Jul 2006 11:26:44 -0300 (ADT) Received: by kenobi.snowman.net (Postfix, from userid 1000) id AAEA75805A; Wed, 19 Jul 2006 09:26:43 -0500 (CDT) Date: Wed, 19 Jul 2006 10:26:43 -0400 From: Stephen Frost To: Florian Weimer Cc: Guoping Zhang , pgsql-performance@postgresql.org Subject: Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance? Message-ID: <20060719142643.GF20016@kenobi.snowman.net> Mail-Followup-To: Florian Weimer , Guoping Zhang , pgsql-performance@postgresql.org References: <82irlu2jk9.fsf@mid.bfk.de> <003501c6ab05$a4978f20$74304c93@eddy> <20060719140135.GE20016@kenobi.snowman.net> <82bqrl1xwk.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+JUInw4efm7IfTNU" Content-Disposition: inline In-Reply-To: <82bqrl1xwk.fsf@mid.bfk.de> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.16-2-vserver-686 (i686) X-Uptime: 10:22:34 up 24 days, 4:18, 18 users, load average: 0.50, 0.69, 0.88 User-Agent: Mutt/1.5.11+cvs20060403 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/195 X-Sequence-Number: 20055 --+JUInw4efm7IfTNU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Florian Weimer (fweimer@bfk.de) wrote: > * Stephen Frost: > > Actually, can't you stick multiple inserts into a given 'statement'? > > ie: insert into abc (123); insert into abc (234); >=20 > IIRC, this breaks with PQexecParams, which is the recommended method > for executing SQL statements nowadays. For prepared queries you're absolutely correct. It's also true that it's the recommended approach for large numbers of inserts. If the network delay is more of a problem than the processing speed then it might make sense. It does seem to me that with multi-value insert we might consider changes to libpq to be able to use multi-value prepared inserts... Or it might be interesting to see the performance of non-prepared multi-value inserts vs. prepared statements. Thanks, Stephen --+JUInw4efm7IfTNU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQFEvkEjrzgMPqB3kigRAjGJAJ4ikvFz2X6ik80r5ttSxhiHSsDc5ACcCmC4 mrVwDmIQffWIQ56GXK9Fmt4= =1DrR -----END PGP SIGNATURE----- --+JUInw4efm7IfTNU--