Bugorr has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I need to create persistent database connection pooling for our internal application. Please advise on fastest and easisest road... :) Thank you in advance !!!

Replies are listed 'Best First'.
Re: persistent database connection pooling
by johnnywang (Priest) on Aug 26, 2005 at 17:11 UTC
    If you're running in Apache, call "use Apache::DBI" before calling "use DBI". The Apache::DBI module intercepts all DBI calls, and makes the connection persistent.
Re: persistent database connection pooling
by perrin (Chancellor) on Aug 26, 2005 at 17:08 UTC
    my $dbh = DBI->connect_cached(...);
    That gives you persistence. "Pooling", i.e. sharing between processes, is an unsolved problem, but doesn't matter for most applications since they can't do anything useful when they don't have a handle anyway.
      Pooling", i.e. sharing between processes, is an unsolved problem
      Though Stas Bekman and Dean Arnold are working on DBI::Pool and DBIx::Threaded. See the dbi-dev archives for details.
Re: persistent database connection pooling
by runrig (Abbot) on Aug 26, 2005 at 17:13 UTC
    Have you tried google (I see something called Sql Relay)? And are you sure you want a pool of connections, or is Apache::DBI or connect_cached good enough?