Skip site navigation (1) Skip section navigation (2)

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:36:04
Message-ID: BANLkTikrxWBD_+BBOw9NY4reiN03UqV1ow@mail.gmail.com (view raw or flat)
Thread:
Lists: psycopg
- 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

Responses

psycopg by date

Next:From: Israel Ben Guilherme FonsecaDate: 2011-05-11 12:41:42
Subject: Re: Input and Output data traffic
Previous:From: Karsten HilbertDate: 2011-05-11 12:21:31
Subject: Re: Input and Output data traffic

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group