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.
But it's too soon to say anything for now, I'll do some tests latter to see what happens.
2011/5/11 Karsten Hilbert
<Karsten.Hilbert@gmx.net>On Wed, May 11, 2011 at 01:56:08PM -0300, Israel Ben Guilherme Fonseca wrote:
> With the log tips of Oswaldo, I saw that
>
> SET TRANSACTION ISOLATION LEVEL READ COMMITTED
>
> on every instruction as you said Danielle. JDBC dont have those and it use
> parameters for the statements, psycopg do not (its embedded in the SQL). I
> dont know if this could have some impact.
>
> I used the recommended way to avoid SQL Injection by the way.
>
> execute("insert into table(col) values(%s)", (10,))
I wonder how any of this is supposed to have any impact on
the expected up-/down-traffic ratio which was the only thing
the OP reported to be different between psycopg2 and JDBC
(if I correctly understood the original post).
Karsten
--
GPG key ID E4071346 @
gpg-keyserver.de E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
--