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 11:43:23
Message-ID: 20110511114322.GI6613@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, May 11, 2011 at 08:18:40AM -0300, Israel Ben Guilherme Fonseca wrote:

> LOL, sorry I wasn't explicit in my text. But i did the same test with
> psycopg2 too. :P

:-) That makes better sense now.

> "For simple inserts/updates/deletes i got a difference of about 15% between
> sent and received data."

...

> If someone could say: "well, sent/received data should be significantly
> different and there is something wrong there", or "no it's normal". That
> would be helpful.

It very much depends on the exact queries used:

1) INSERT INTO my_table (a, b) VALUES (1, 2);

2) INSERT INTO my_table (a, b) VALUES (1, 2) RETURNING a, b;

I would expect a lot more data to be returned with 2) than
with 1).

(That difference in testing setup does not explain the
differences between drivers, though, if one assumes you've
been using the very same queries with each.)

The other thing is that one driver may be using server-side
cursors while another driver will use client-side cursors.
The latter will transfer a lot more data.

I think you'd have to be more specific about the exact
testing methodology to get useful advice.

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 12:01:35 Re: Input and Output data traffic
Previous Message Israel Ben Guilherme Fonseca 2011-05-11 11:19:27 Re: Input and Output data traffic