Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Re: Database Connection Pooling: Take 2

by iguanodon (Priest)
on Mar 11, 2003 at 01:44 UTC ( #241908=note: print w/replies, xml ) Need Help??

in reply to Re: Database Connection Pooling: Take 2
in thread Database Connection Pooling: Take 2

Very interesting. I always accepted it as Conventional Wisdom that connection pooling was the 'right' thing to do, because making connections is 'expensive'. I have to confess to some cargo cult belief here because I've always just accepted this without understanding it. Is it your opinion then that the overhead of connection pooling is as expensive or more expensive than making new connections?

  • Comment on Re: Re: Database Connection Pooling: Take 2

Replies are listed 'Best First'.
Re: Re: Re: Database Connection Pooling: Take 2
by perrin (Chancellor) on Mar 11, 2003 at 03:43 UTC
    Making new connections is expensive, but connection pooling is not the only alternative. The Apache::DBI module keeps connections open so that you don't need to re-connect. It is not "pooling" because the connections are not shared -- each process opens a connection and keeps it open.

    This will change with the thread support in mod_perl 2 and a future release of DBI which will include direct support for connection pooling. In the meantime, what Apache::DBI does is fine for most sites.

Re: Re: Re: Database Connection Pooling: Take 2
by mpeppler (Vicar) on Mar 11, 2003 at 19:38 UTC
    The reason I've used connection pooling is when the total number of clients is potentially very large (5-10 thousand or more). Maintaining a very large number of connections on the database server generates quite a bit of overhead. If these connections aren't active all the time then pooling them can make sense.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241908]
and nobody stirs...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-10-21 03:56 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (269 votes). Check out past polls.