[Tutor] Python+CGI+MySQL performance
Pijus Virketis
virketis@fas.harvard.edu
Sat, 26 Jan 2002 16:51:20 -0500
Hi,
> I am supporting a web site that uses "this approach" to accessing MySQL.
> (this approach == Each 'submit button click' does a new connection to
MySQL.)
> The CGI scripts are written in Perl and the ISP is using mod_perl
> to minimize script startup time. However, there is no reason to believe
> that Perl is any quicker than Python in this kind of application.
Mind you, there is a mod_python plug-in for Apache as well. You can get it
on Sourceforge:
http://sourceforge.net/projects/modsnake/
If your ISP is willing to install it, you'll get great speed from your
scripts.
When it comes to the Python-MySQL connection, use the MySQLdb module:
http://sourceforge.net/projects/mysql-python/
It works great with anything above and including Python 1.5.2 and from the
tinkering around I have done so far, it looks to be pretty speedy. However,
I have not used it for real work yet, and your mileage may vary. :)
Cheers,
Pijus