Home > DeveloperSection > Interviews > What is a pre-requisite for connection pooling?

Posted on    October-16-2010 12:00 AM

 C# C# 
Ratings:
 1 Answer(s)
  1080  View(s)
Rate this:

Pushpendra Singh

Total Post:241

Points:1205
Posted on    November-01-2010 12:00 AM

Connection Pooling can increase the database performance to a huge extent.
A Connection Pool is a container of open and reusable connections. A Connection Pool is released from the memory when the last connection to the database is closed. The basic advantage of using Connection Pooling is an improvement of performance and scalability while the main disadvantage is that one or more database connections, even if they are currently not being used, are kept open. The Data Providers in ADO.NET have Connection Pooling turned on by default; if you need to turn it off, specify Pooling = false in the connection string being used. Connection Pooling gives you an idle, open, reusable connection instead of opening a new one every time a connection request to the database is made. When the connection is closed or disposed, it is returned to the pool and remains idle until a request for a new connection comes in. If we use Connection Pooling efficiently, opening and closing of connections to the database becomes less resource expensive.

Don't want to miss updates? Please click the below button!

Follow MindStick