Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-06-25 03:26 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.