Re: Input and Output data traffic

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: psycopg(at)postgresql(dot)org
Subject: Re: Input and Output data traffic
Date: 2011-05-11 18:40:23
Message-ID: 20110511184022.GT6613@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, May 11, 2011 at 02:37:28PM -0300, Israel Ben Guilherme Fonseca wrote:

> With that extra clause on every commit, that could increase the size of the
> sent data. JDBC doesn't do it, so maybe it could be the cause, at last for
> the sent data not the received data.

This is what you originally wrote:

>> The volume of sent data (application -> database) and the response data
>> (database -> application) are basically the same.
>>
>> For simple inserts/updates/deletes i got a difference of about 15% between
>> sent and received data.

(later you said you were testing INSERTs only ...)

>> I used a ruby driver and got the same results for the same instruction.
>>
>> Finally I used a Java JDBC driver (for postgres too), and the difference was
>> huge, it was 70% (the received data was much smaller).

What you've been wondering here is this:

- psycopg2 sends, say, 100 bytes (+some) and receives 85 bytes (+some)
- JDBC sends, say, 100 bytes and receives 30 bytes

Now, since psycopg2 supposedly *sends more* data (namely
setting the transaction isolation level) how is that
supposed to make the difference between sent and received
*smaller* ? This would only make sense if the "more" data
would provoke *a lot more* data to be received. Which
setting the transaction isolation certainly shouldn't.

But maybe I'm royally screwing up my thinking :-)))

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Israel Ben Guilherme Fonseca 2011-05-11 19:10:26 Re: Input and Output data traffic
Previous Message Israel Ben Guilherme Fonseca 2011-05-11 17:37:28 Re: Input and Output data traffic