[DB-SIG] Python/PostgreSQL API performance comparison

Thierry MICHEL thierry at nekhem-labs.org
Tue Jun 3 07:52:04 EDT 2003


Hi all,

Thank you very much for the tests Chris!

On Mon, 2003-06-02 at 20:49, Federico Di Gregorio wrote:
> Il lun, 2003-06-02 alle 20:43, Chris Cogdon ha scritto:
> > On Monday, Jun 2, 2003, at 10:42 US/Pacific, Federico Di Gregorio wrote:
> > 
> > > would you add psycopg to the tests, please. just eager to know how well
> > > it does.
> > 
> > Ah, thanks for reminding me about your module :) Here's the results:
> > 
> > pg [ 0.180, 0.010, 0.000, 0.000, 29.610 ]
> > pgdb [ 4.570, 0.000, 0.000, 0.000, 33.520 ]
> > PgSQL [ 4.480, 0.010, 0.000, 0.000, 42.450 ]
> > PgSQL (nocursor) [ 4.480, 0.010, 0.000, 0.000, 33.530 ]
> > PgSQL (nocursor,list) [ 3.620, 0.020, 0.000, 0.000, 32.570 ]
> > PoPy [ 0.200, 0.010, 0.000, 0.000, 29.280 ]
> > psycopg [ 0.300, 0.010, 0.000, 0.000, 29.330 ]
> > 
> > Vigilant readers will note that the figures are a little larger than 
> > those I posted last time. A fair bit of data has been added to the 
> > database since. Yes, having a 'consistent framework' would be nice, 
> > but... I never said these were 'laboratory quality' values :)
> > 
> > So... psycopg performs pretty well... but... I'm sure you could squeeze 
> > that 0.1 out, couldn't you? :) Reading up on the docs for psycopg, it 
> 
> i is already pretty good, considered that psycopg does a lot more stuff
> than popy (custom type-casters, etc.)

> > appears it's designed to perform well under heavy-load applications 
> > with multiple, persistant connections to the database. I might see if I 
> > can design a test to shake out that particular metric, since that's 
> > very important for my application.
> 
> psycopg is very aggressive on calling Py_*_ALLOW_THREADS macros so
> you'll get the best performance on multithreaded applications.

As popy do too. The use of this macro is recommanded each time you want
to access external C functions of postgresql library not fully threaded.
> thank you for the tests,
> federico
> 
> 
> ______________________________________________________________________
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig

These tests will help us the define better the design of our new driver
Popy3 we are still developping. We hope give you the first alpha release
of Popy3 as soon as possible.

Thanks again.

 
-- 
Thierry MICHEL

Software Designer & Developer
19 rue de l'ail
67000 Strasbourg France
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/db-sig/attachments/20030603/cabc5e9b/attachment-0001.bin


More information about the DB-SIG mailing list