Re: Input and Output data traffic

Поиск
Список
Период
Сортировка
От Israel Ben Guilherme Fonseca
Тема Re: Input and Output data traffic
Дата
Msg-id BANLkTikrxWBD_+BBOw9NY4reiN03UqV1ow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Input and Output data traffic  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Ответы Re: Input and Output data traffic
Re: Input and Output data traffic
Re: Input and Output data traffic
Список 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.Hilbert@gmx.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/psycopg

В списке psycopg по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Input and Output data traffic
Следующее
От: Israel Ben Guilherme Fonseca
Дата:
Сообщение: Re: Input and Output data traffic