Re: Input and Output data traffic - Mailing list psycopg

From Karsten Hilbert
Subject Re: Input and Output data traffic
Date
Msg-id 20110511184022.GT6613@hermes.hilbert.loc
Whole thread Raw
In response to Re: Input and Output data traffic  (Israel Ben Guilherme Fonseca <israel.bgf@gmail.com>)
Responses Re: Input and Output data traffic
List 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

psycopg by date:

Previous
From: Israel Ben Guilherme Fonseca
Date:
Subject: Re: Input and Output data traffic
Next
From: Israel Ben Guilherme Fonseca
Date:
Subject: Re: Input and Output data traffic