in reply to Reusing a dbh from a CGI script via OO method

Every CGI invocation is a separate DB connection. If you are connecting more than once per invocation, you can save some time there. If you want to hold the connection longer than a specific CGI invocation, you need to run under mod_perl, or perhaps use a proxy connection, as described in DBI::ProxyServer and DBD::Proxy. (I'm planning on writing a WT column soon that shows how to do this. Maybe even today, since one is due!)

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Reusing a dbh from a CGI script via OO method

Replies are listed 'Best First'.
RE: Re: Reusing a dbh from a CGI script via OO method
by coreolyn (Parson) on Aug 14, 2000 at 20:26 UTC

    That's what I thought. But I've thought wrong before. Thanks for firming that up, and I'll look forward to that article :)

    coreolyn Duct tape devotee.