Send feedback on this topic.
Teradata.Client.Provider
Connection Pooling
.NET Data Provider for Teradata > Developer's Guide > Performance Considerations And Best Practices > Connection Pooling

Connection pooling provides the establishment of a persistent connection that may be shared across multiple Connections (TdConnection) to the Advanced SQL Engine.  Connection pools are identified based upon the connection string utilized to create a connection in a hashing algorithm.  In the case of single sign on (SSO), a provision has been added to the hashing algorithm that supports the addition of an SSPI user name, obtained from the operating system. This supports a unique connection pool name for all users, and insures the selection of the proper connection pool.

Connection pooling is enabled by default.  Connection pooling may be disabled by adding “Connection Pooling=false” to the connection string.  A typical connection string containing this keyword is:

     "Data Source=mySystem; User Id=myUserId; Password=myPasswrod; Connection Pooling=true;
MinPoolSize=2; MaxPoolSize=3; ConnectionPoolingTimeout=120;"

Optionally, ConnectionPoolingTimeout, MinPoolSize and MaxPoolSize may also be supplied in the connection string to change the default values of these keywords.

ConnectionPoolingTimeout will specify a timer value utilized to retire connections that are returned to the connection pool.  Once a connection is returned to the pool (TdConnection.Close), the connection becomes a candidate for release.  If the connection is not reused within an idle time period spanning up to twice the ConnectionPoolingTimeout seconds, the connection will be released.  The connection will be released only if the resulting connection pool count meets or exceeds the MinPoolSize.  Setting the ConnectionPoolingTimeout value to 0 will disable the task that closes connections, therefore disabling connection timeouts.

MinPoolSize sets the minimum connections available in the connection pool.  MaxPoolSize sets the maximum number of connections available in the connection pool.

Default values for MinPoolSize, MaxPoolSize and ConnectionPoolingTimeout are 0, 100 and 60 seconds respectively.

See Also:

Performance Counters