Re: Protocol 3, Execute, maxrows to return, impact?

From: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
To: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Protocol 3, Execute, maxrows to return, impact?
Date: 2008-07-28 21:04:21
Message-ID: 20080728210421.GD31945@cuci.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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."

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Decibel! 2008-07-28 21:29:48 Re: [RFC] Unsigned integer support.
Previous Message Martijn van Oosterhout 2008-07-28 20:40:26 Re: Do we really want to migrate plproxy and citext into PG core distribution?