I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application. The ASP.Net Web application is database centric/driven. I want to know whether there are any performance reference data about what are the differences of performance when we turn on/off thread pool setting in ADO.Net connecting string setting? Performance I mean both the concurrent connection which could be supported and the execution time of a specific SQL Command executed from ADO.Net client side?
thanks in avdance,
George
Best Answer
I don't have any performance stats at hand, but maybe a word of warning when using connection pooling: you might end up with too many small pools, instead of one large one.
ADO.NET will create a new connection pool for
each connection string; it is very picky about this, too - if you have two connection strings that are different by even just a single space or something, those are considered two separate connection strings, and will lead to separate connection pools being created
for each Windows credentials if using the "integrated security" (trusted connection) setting
So if you have a connection string something like
one connection pool for each distinguishable user will be created - that's rather counter-intuitive, but that's the way it is (and it cannot be influenced / turned off).
Check out the MSDN docs on ADO.NET connection pooling for details:
Also, if you have these two connection strings:
and
those are considered different connection strings, and thus two separate connection pools will be created.
When attempting to measure the effect of connection pooling, this is something to be aware of!
Marc