Re: Client libraries supporting pipelining - Mailing list pgsql-interfaces

From Jeroen T. Vermeulen
Subject Re: Client libraries supporting pipelining
Date
Msg-id 14958.203.121.164.162.1139887843.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to Client libraries supporting pipelining  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-interfaces
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




pgsql-interfaces by date:

Previous
From: "Eric Chapdelaine"
Date:
Subject: libpq - Unhandled Exception - Executing Samples under win32
Next
From: Murray Cumming
Date:
Subject: Re: Finding the pqlib version