Database Connection Pooling - Coddicted

Database Connection Pooling 2

In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and wastes resources.

 
In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database.
 
Hence potential benefits of connection pooling
  1. Performance. Connecting to the database is expensive and slow. Pooled connections can be left physically connected to the database, and shared among the various components that need database access. That way the connection cost is paid for once and amortized across all the consuming components.Creating prepared statements is also expensive for some drivers, and the connection pool can cache statements for a connections across requests
  2. Diagnostics. If you have one sub-system responsible for connecting to the database, it becomes easier to diagnose and analyze database connection usage.
  3. Maintainability. Again, if you have one sub-system responsible for handing out database connections, your code will be easier to maintain than if each component connected to the database itself. Also maintaining many idle connections is expensive for a database management system, and the pool can optimize the usage of idle connections (or disconnect if there are no requests).

Back To Top
Rate this post

2 thoughts on “Database Connection Pooling

  1. Reply fruta planta pills ingredients Jul 10,2013 5:46 am

    These are genuinely impressive ideas in concerning blogging. You have touched some fastidious things here. Any way keep up wrinting.

  2. Reply NealKMorasca Feb 21,2016 4:48 pm

    Thanks for every other informative website. Where else may just I am getting that type of information written in such an ideal manner?
    I’ve a project that I’m simply now operating on, and I’ve been on the
    look out for such info.

Leave a Reply