Linux Magazine: mod_perl, Part Two
Feb 14, 2005, 11:30 (0 Talkback[s])
(Other stories by Randal L. Schwartz)
"As I mentioned last month, having persistent Perl code means
that some steps of your application can be reused rather than
repeated. One very easy optimization is keeping your database
handles open between web hits, rather than reopening them on each
new hit. The Apache::DBI module (found in the CPAN) does the work
for you by altering the way normal DBI connections are
"If your application is like most, you simply add PerlModule
Apache::DBI to the configuration file, and it just magically works.
The disconnect() method of DBI is altered so that it doesn't really
disconnect, and the connect() method attempts to reuse an already
existing handle opened with the same database parameters (including
user and password)..."