[PYTHON DB-SIG] Python vs Perl DB API

Orjan Reinholdsen orjan@spinne.ip.lu
Wed, 5 Feb 1997 17:47:15 +0000


Lately, I'v left Perl behind and I'm now using Python (and 
'oracledb') to interface our Oracle DB. Generally this works great 
and I really adore the Python syntax compared to Perl, but now I'v 
run into some questions regarding speed:

I'v timed the execution of a Perl script and a Python script 
doing the same thing, with the result that the Perl script is 
roughly 3 times faster that the Python script. I should note that the 
DB operations in the scripts involves a select and the formating 
of roughly 2500 lines of text output (mainly using 'print'). 

So the question arise: Why is the Python script significantly slower 
than the Perl script? Is it because of the  "speed" of 'oracledb' 
and/or the Python DB API, or is it because Python is generically 
slower that Perl? Any suggestions for speed improvement??

Happy for ANY answer.

Orjan Reinholdsen
 Orjan Reinholdsen                                      Infopartners SA 
 Voice: +352 29 57 59 33 02                             Fax: +352 29 57 59 39 00
 e-mail: orjan@ip.lu

DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org