Re: Input and Output data traffic

From: Israel Ben Guilherme Fonseca <israel(dot)bgf(at)gmail(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Re: Input and Output data traffic
Date: 2011-05-11 12:41:42
Message-ID: BANLkTi=KxDXhpm8jhe0yzTvbPOajf5LrHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Just to conclude, the stranger thing is:

The ruby driver got almost the same results of psycopg2, That's what I
expected at all. Only the Java version that get those odd values, SO maybe
it's possible that I'm still doing something wrong so I'll give a look at
the code again.

Anyway, thanks for the responses,

2011/5/11 Israel Ben Guilherme Fonseca <israel(dot)bgf(at)gmail(dot)com>

> - Same connection for all runs, the setup traffic was cleared before the
> execution of the test itself.
>
> 1) I would say that it is a premature optimization, actually thats a Paper
> for my university, I'm doing some ORMxDirect Access comparisons between
> different languages and frameworks. After some tests, i got these "strange"
> results, that's why I called you guys. :)
>
> 2) That would be very nice if we could help to improve psycopg driver. If I
> did a smaller documented-test-suite and sent it to you would it be helpful?
>
>
> 2011/5/11 Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
>
>> On Wed, May 11, 2011 at 09:01:35AM -0300, Israel Ben Guilherme Fonseca
>> wrote:
>>
>> > I'm not with java code right now, but the python one is this:
>> >
>> > def inserir(self, curso):
>> > cursor = self.conn.cursor()
>> > cursor.execute("""insert into Curso(area, carga_horaria, ementa,
>> > nome)
>> > values(%s, %s, %s, %s)""",
>> > (curso.area, curso.carga_horaria,
>> curso.ementa,
>> > curso.nome))
>> > cursor.close()
>> > self.conn.commit()
>> >
>> > - Simple insert, without returning.
>> > - With a proxy between application and database i measured the quantity
>> of
>> > transfered data.
>> > - Executed 1000 times.
>>
>> Is the connection torn down and set up for each of those
>> runs ? That would account for some back-traffic due to
>> connection setup queries being run by psycopg2.
>>
>> 1) What's your objective ? Are you trying to solve a
>> real-world problem ? Or is this premature optimization ?
>>
>> 2) If the claim that JDBC needs a lot less back traffic for
>> getting the same amount of work done we'd surely like to
>> know why and how (for which we'd need details) in order to
>> decide whether there's something to be gained from that
>> insight.
>>
>> Karsten
>> --
>> GPG key ID E4071346 @ gpg-keyserver.de
>> E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
>>
>> --
>> Sent via psycopg mailing list (psycopg(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/psycopg
>>
>
>

In response to

Browse psycopg by date

  From Date Subject
Next Message Karsten Hilbert 2011-05-11 12:43:15 Re: Input and Output data traffic
Previous Message Israel Ben Guilherme Fonseca 2011-05-11 12:36:04 Re: Input and Output data traffic