Re: Protocol 3, Execute, maxrows to return, impact? - Mailing list pgsql-hackers

From Stephen R. van den Berg
Subject Re: Protocol 3, Execute, maxrows to return, impact?
Date
Msg-id 20080730100547.GA14714@cuci.nl
Whole thread Raw
In response to Re: Protocol 3, Execute, maxrows to return, impact?  ("Stephen R. van den Berg" <srb@cuci.nl>)
List pgsql-hackers
Stephen R. van den Berg wrote:
>A.M. wrote:
>>Anyway, what does "The driver beats libpq in speed by about 62%" mean?

>I.e. speed comparison is 762/483 = 1.63 -> 63% faster.

After some tuning on the libpq side, I can say that:

If libpq is called using a cursor and fetches in 64 row chunks the speed
difference with my driver above is correct.
If libpq is called *not* using a cursor and fetches all (1000) rows in one
go, the new comparison becomes:

583/483 = 1.21, which still makes my driver 21% faster than libpq native.

Please note that my driver automatically chunks up the query using
multiple chained Execute(dynamically calculated limit) and allows
fetching the rows on demand and interleaving portals.
My driver uses a 32KByte buffer per active portal.
-- 
Sincerely,          Stephen R. van den Berg.

How many weeks are there in a lightyear?


pgsql-hackers by date:

Previous
From: Jorgen Austvik - Sun Norway
Date:
Subject: Re: pg_regress inputdir
Next
From: Gregory Stark
Date:
Subject: Re: Type Categories for User-Defined Types