[DB-SIG] Python/PostgreSQL API performance comparison

Federico Di Gregorio fog at initd.org
Mon Jun 2 19:48:40 EDT 2003


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.

thank you for the tests,
federico

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
Url : http://mail.python.org/pipermail/db-sig/attachments/20030602/586d3795/attachment.bin


More information about the DB-SIG mailing list