Re: psycopg

Jacob Smullyan <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Thu, 2004-07-29 at 08:30, Pierre-Frédéric Caillaud wrote:
> 	Hello,
> 
> 	How's it going ?
> 
> 	I noticed a speed difference between the various postgresql interfaces :
> 
> 	For the same query, returning 40000 rows of data (one column integer, one  
> column integer[]), I have the following timings :
> 
> 	pyPgSQL :	10.20 s
> 	pgdb :	4.36 s
> 	psycopg :	0.38 s
> 
> 	pyPgSQL is slow because it converts the integer[] to a class og its own  
> (PgIntArray or something).
> 	pgdb is just slow
> 	psycopg is written entirely in C.
> 
> 	Using a conversion function of my own, I select, retrieve and convert  
> (integer[] -> python list) the 40.000 rows in about one second.
> 
> 	So, I guess SkunkWeb needs a psycopg interface ;)

Sounds like it.  I've never used arrays in postgresql and haven't seen
such a stark performance issue with pyPgSQL or pgdb.  

PyDO does have psycopg interface that someone contributed -- I haven't
used it -- but we don't have the corresponding service/cache modules. 
Should someone be moved to produce them, I'd be inclined to check them
in :).

js




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.