Connection pooling does not do what you think it does.
If you do something like this
var connection = new SqlConnection(connectionString);
connection.Open();
var command = connection.CreateCommand();
command.CommandText = // some query
var reader = command.ExecuteReader();
var anotherCommand = connection.CreateCommand();
anotherCommand.CommandText = // another query
var anotherReader = anotherCommand.ExecuteReader();
then all of this will happen on one connection, whether or not you have connection pooling.
Connection pooling just keeps a cache of connections that you can draw from every time that you create a new connection (new SqlConnection
) and open it (SqlConnectinon.Open
). When you close a connection, it returns to the pool to be reused. But one open SqlConnection
object corresponds to one connection from the pool. Period.