On 05/12/2011 10:45 AM, Israel Ben Guilherme Fonseca wrote:
> Almost difference of received data size is HUGE. Do you guys have any
> idea about what could am I doing wrong? I heard something about binary
> protocol, could it help?
The total size of the transferred data in your tests appears to be tiny.
As a result, you are measuring the connection overhead of the drivers
more than anything else. The JDBC driver will be issuing a lot more SET
statements and the like during connection setup than psycopg2 does. To
see exactly what the differences are, enable full statement logging in
the server so you can see everything that's issued.
Try testing with a meaningful amount of data, or starting measuring only
after you've established a connection.
--
Craig Ringer