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 20080728210421.GD31945@cuci.nl
Whole thread Raw
In response to Re: Protocol 3, Execute, maxrows to return, impact?  ("A.M." <agentm@themactionfaction.com>)
Responses Relicensed and downloadable (Re: Protocol 3, Execute, maxrows to return, impact?)  ("Stephen R. van den Berg" <srb@cuci.nl>)
Re: Protocol 3, Execute, maxrows to return, impact?  ("Stephen R. van den Berg" <srb@cuci.nl>)
List pgsql-hackers
A.M. wrote:
>Anyway, what does "The driver beats libpq in speed by about 62%" mean?

It means that if I open up a connection, my lib only takes half the time
libpq uses to open up the connection, and it also means that
when I run the following query 10 times in a row:
  SELECT * FROM pg_catalog.pg_type as a,pg_catalog.pg_type as b LIMIT 1000

and the resultset is subsequently splitted, parsed and copied *per* row and
column into memory, and then discarded;
that using my driver it takes 483 units of time, and using the libpq
driver it uses 762 units of time.

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

The test environment is:

unloaded Linux 2.6.26 client using libpq5 8.3.3, and an unloaded Linux 2.6.26
server running PostgreSQL 8.3.3, 100Mb/s ethernet in between.

The test is I/O bound, and therefore tests the client-lib efficiency.
-- 
Sincerely,          Stephen R. van den Berg.

"Even if man could understand women, he still wouldn't believe it."


pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?
Next
From: Decibel!
Date:
Subject: Re: [RFC] Unsigned integer support.