[DB-SIG] Python/PostgreSQL API performance comparison (update)

Chris Cogdon chris at cogdon.org
Sun May 25 14:48:34 EDT 2003


On Sunday, May 25, 2003, at 13:34 US/Pacific, Marcos Sánchez Provencio 
wrote:

> One note for multithreaded appserver (webware, zope...). Due to the 
> global lock, the DBMS and the app act funny regarding balance of load. 
> If the app is too heavy, it can suck up one CPU while the other is 
> idle. In this case, it would be worth to pass some load to the DBMS.

Unfortunately, in terms of CPU utilisation I don't think it's passing 
load to the DMBS, but just creating EXTRA load on the DMBS. Compare the 
'user' times in both cases. The 'declare cursor' version actually 
consumes a small amount extra, but a LOT of extra real time. Viz:

> PgSQL [ 3.650, 0.010, 0.000, 0.000, 41.150 ]
> PgSQL (nocursor) [ 3.620, 0.010, 0.000, 0.000, 32.320 ]

However, if memory is an issue, and you're expecting really large 
datasets, then I can see that being an advantage.


-- 
    ("`-/")_.-'"``-._        Chris Cogdon <chris at cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL




More information about the DB-SIG mailing list