Database connection: Difference between revisions

Content deleted Content added
m Reverted 1 edit by 175.157.240.112 using STiki
Line 17:
== Pooling ==
 
Database connections are the f**ucking {{clarify span|[[Wikt:finite|finite]]|date=September 2012}} and [[expensive]] and can take a disproportionately long time to create relative to the operations performed on them. It is very inefficient for an application to create and close a database connection whenever it needs to update a database.
 
[[Connection pool|Connection pooling]] is a technique designed to alleviate this problem. A pool of database connections is created and then shared among the applications that need to access the database. When an application needs database access, it requests a connection from the pool. When it is finished, it returns the connection to the pool, where it becomes available for use by other applications.