[PYTHON DB-SIG] Python vs Perl DB API
Wed, 5 Feb 1997 11:07:24 -0800
>From: Orjan Reinholdsen [SMTP:firstname.lastname@example.org]
>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??
>1. The Oracle interface is not optimized for speed of execution so much as
>speed of implementation :-). In particular, it re-prepares and re-binds a
>query whenever it is reused. I would call the author of it all sort of
>filthy names, except I wrote the code myself.
>2. Formatting of output is (or should be) Perl's particular metier.
>BTW, where is ".lu"? Lithuania?
DB-SIG - SIG on Tabular Databases in Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org