Search code examples
asp.netconnection-pooling

What really is connection pooling?


I have heard the term connection pooling and looked for some references by googling it... But can't get the idea when to use it....

  • When should i consider using connection pooling?

  • What are the advantages and disadvantagesof connection pooling?

Any suggestion....


Solution

  • The idea is that you do not open and close a single connection to your database, instead you create a "pool" of open connections and then reuse them. Once a single thread or procedure is done, it puts the connection back into the pool and, so that it is available to other threads. The idea behind it is that typically you don't have more than some 50 parallel connections and that opening a connection is time- and resource- consuming.