Web DBI - Connect speed
l Databases can be slow to connect
Traditional CGI forces a new connect per request
l Move Perl and DBI into the web server
Apache with mod_perl and Apache::DBI module
Microsoft IIS with ActiveState's PerlEx
l Connections can then persist between requests
Apache::DBI automatically used by DBI if loaded
No CGI script changes required to get persistence
l Take care not to change the shared session behaviour
Leave the $dbh in the same state you found it!
l Other alternatives include
n FastCGI, CGI::SpeedyCGI and CGI::MiniSvr
43