I don't have performance statistics, but maybe a word of warning when using the connection pool: you may have too many small pools, and not one large.
ADO.NET will create a new connection pool for
each connection string; this is very , if you have two connection strings that differ even in one space or something else, this is considered two separate connection strings and will lead to separate connection pools being created
for each Windows credential if the "built-in security" setting is used (trusted connection)
So if you have a connection string like
server=MyDBServer;database=MyDatabase;integrated security=SSPI;
one connection pool will be created for each distinguishable user - which is more likely to contradict intuition, but how it is (and cannot be affected / disabled).
See the MSDN docs in the ADO.NET connection pool for more details:
When the connection is open, the connection pool is created based on the exact match algorithm that associates the pool with the connection string in the connection. Each connection pool is associated with a separate connection string. When a new connection is opened, if the connection string is not an exact match for an existing pool, a new pool is created. Connections are combined in a process for each application domain, per connection string and during integration , protection for Windows is used . Connection strings should also be an exact match; the delivered keywords in a different order for the same connection will be combined separately.
Also, if you have these two connection strings:
server=MyDBServer;database=MyDatabase;user id=tom;pwd=top$secret
and
server=MyDBServer;database=MyDatabase;user id=tom; pwd=top$secret;
these strings are considered different , and therefore two separate connection pools will be created.
When trying to measure the effect of a connection pool, this is what you need to know!
Mark
source share