perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Leonard II" <>
Subject Application object and DB handle
Date Fri, 22 Jun 2001 03:21:11 GMT

I use DBI and PostgresSQL on Apache 1.3.20, mod_perl 1.25, and Apache::ASP

What is the "best" way to create and dispose of DB handles?  Are there
implementation or performance gotcha's between the following alternatives:

A) Should I create and destroy a single global variable (e.g., $dbh) in the
Application_OnStart and _OnEnd.

B) Should each $Session create and destroy it's own DB handle stored in the
$Session object?

C) Should each script create and destroy it's own handle in the
Script_OnStart and _OnEnd?

D) Should I use the approach offered by Apache::DBI?


John D. Leonard II, Associate Professor            Phone: 404/894-2360
School of Civil and Environmental Engineering       FAX:  404/894-2278
Georgia Institute of Technology 
Atlanta, GA  30332-0355    

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message