SQL Server Connection Pooling

  • Thread starter Thread starter Alan Pretre
  • Start date Start date
A

Alan Pretre

Does minpoolsize=0 in the connection string for SQL Server mean that there
is effectively no pool? Or would there always be one connection after the
connection was opened and closed once?

-- Alan
 
Does minpoolsize=0 in the connection string for SQL Server mean that there
is effectively no pool?
Nope.

Or would there always be one connection after the connection was opened
and closed once?

Nope.

The actual number of connections in the pool are controlled from within
ADO.NET, and they are generally based on load/availability of connections.
Setting Maxpoolsize=1 would effectively kill connex pooling, or setting
connex pooling = false.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
 
Sahil Malik said:
The actual number of connections in the pool are controlled from within
ADO.NET, and they are generally based on load/availability of connections.
Setting Maxpoolsize=1 would effectively kill connex pooling, or setting
connex pooling = false.

Thanks...

Is minpoolsize ignored then with ADO.NET?

-- Alan
 
Nope. Each provider implements its own flavor of Connection Pooling.
MinPoolSize tells the mechanism to always keep this number of Connections in
the pool. When it comes time to physically close timed-out (closed)
connections, the mechanism closes all but MinPoolSize connections.
MinPoolSize can help an ASP page get going quickly. When the first
connection of the day is requested, MinPoolSize connections are opened at
that time. This way as additional requests are made and the demand for
connections increases, they are already there in the pool--opened and ready
to go.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top