X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id BE5499DCC5C for ; Mon, 13 Feb 2006 23:31:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01193-08 for ; Mon, 13 Feb 2006 23:31:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-vbr8.xs4all.nl (smtp-vbr8.xs4all.nl [194.109.24.28]) by postgresql.org (Postfix) with ESMTP id 3F0029DCADA for ; Mon, 13 Feb 2006 23:31:21 -0400 (AST) Received: from webmail.xs4all.nl (dovemail4.xs4all.nl [194.109.26.6]) by smtp-vbr8.xs4all.nl (8.13.3/8.13.3) with ESMTP id k1E3Ugqw075264; Tue, 14 Feb 2006 04:30:42 +0100 (CET) (envelope-from jtv@xs4all.nl) Received: from 203.121.164.162 (SquirrelMail authenticated user jtv) by webmail.xs4all.nl with HTTP; Tue, 14 Feb 2006 10:30:43 +0700 (ICT) Message-ID: <14958.203.121.164.162.1139887843.squirrel@webmail.xs4all.nl> In-Reply-To: <8764njm0v9.fsf@mid.deneb.enyo.de> References: <8764njm0v9.fsf@mid.deneb.enyo.de> Date: Tue, 14 Feb 2006 10:30:43 +0700 (ICT) Subject: Re: Client libraries supporting pipelining From: "Jeroen T. Vermeulen" To: "Florian Weimer" Cc: pgsql-interfaces@postgresql.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.058 required=5 tests=[AWL=0.058] X-Spam-Score: 0.058 X-Spam-Level: X-Archive-Number: 200602/50 X-Sequence-Number: 6014 On Tue, February 14, 2006 03:59, Florian Weimer wrote: > Which client libraries support pipelining, to reduce server > round-trips? The C++ interface libpqxx does support pipelining of queries--but perhaps not quite at the level you had in mind. Its "pipeline" class transparently batches up queries and lets you go off to do useful stuff on the client side while they are being submitted and processed. Thus it provides both "split-transaction" operation to hide latency and batch submission to reduce the number of roundtrips. You get to influence when the current batch is sent off, through a minimal interface. Normal operation consists of inserting queries in the one end and retrieving results out the other. This is not an extremely sophisticated mechanism, however. It doesn't do any client-side background processing, and it doesn't transparently prepare statements before executing them. You could still prepare them yourself, of course--or if it really helps to do so automatically, that could be implemented under the existing API. You can find libpqxx at http://thaiopensource.org/development/libpqxx/ Jeroen