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 16:56:08
Message-ID: (view raw or whole thread)
Lists: psycopg
With the log tips of Oswaldo, I saw that


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,))


Anyway, I wil try to get more careful look on this later(maybe not today,
but soon), and tell you guys what happened.

Thanks very much for all the support.

2011/5/11 Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>

> On Wed, May 11, 2011 at 3:38 PM, Israel Ben Guilherme Fonseca
> <israel(dot)bgf(at)gmail(dot)com> wrote:
> > I'm explicitly committing the insert instruction at every iteration, so I
> > don't think that's possible to cache all the inserts in one statement
> like
> > you did.
> In this case, it may be due to the "set isolation level" issued
> together with the "begin" by psycopg. Because you send a very short
> statement between BEGIN/COMMIT pair the code for the set could be a
> relevant part of the communication. The overhead would be less
> relevant with bigger commands per transaction of course.
> This is a point I just wanted to talk about on the ML: will try to
> write this evening/in the next few days.
> -- Daniele

In response to


psycopg by date

Next:From: Karsten HilbertDate: 2011-05-11 17:29:41
Subject: Re: Input and Output data traffic
Previous:From: Daniele VarrazzoDate: 2011-05-11 14:56:56
Subject: Re: Input and Output data traffic

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