pygresql and primary key

Gerhard Häring gerhard.haering at gmx.de
Sat Oct 12 02:36:43 EDT 2002


* Tim Roberts <timr at probo.com> [2002-10-11 23:17 -0700]:
> Gerhard Häring <gerhard.haering at opus-gmbh.net> wrote:
> 
> >Marcin Kadziolka <marcin at linkor.com.pl> [2002-10-10 08:48 GMT]:
> >> Hi!
> >> 
> >> I'm using a pg module wrapper from pygresql.
> >
> >Ouch. I'd recommend you use a DB-API module like pyPgSQL or psycopg. PyGreSQL
> >has a DB-API module called pgdb, too.
> 
> It's clear that DB-API is the wave of the future, but I have to say that
> the old pg methods make more sense to me in many situations.  The ability
> to make a query without the overhead of creating and maintaining a cursor
> just seems more efficient for smaller result sets.

0) do you have a performance problem, if yes continue with 1
1) profile
2) optimize the parts worth optimizing

you'll find that cursors are _not_ the issue, _particularly_ with
smaller result sets.

-- Gerhard




More information about the Python-list mailing list