Once a connection has been created and placed in a pool, an application can re-use that connection without performing the complete connection process. Using a pooled connection can result in significant performance gains because applications can avoid the overhead required when making a new connection. This can be particularly significant for middle-tier applications that connect over a network, or for applications that repeatedly connect and disconnect, such as Internet applications.
ODBC Driver for Teradata for Windows and Apple OS X:
In addition to performance gains, the connection pooling architecture enables an environment (and its associated connections) that can be used by multiple components in a single process. This means that stand-alone components in the same process can interact with each other without being aware of each other. A connection in a pool such as this can be used repeatedly by multiple components.
Connection pooling can be used by an ODBC application exhibiting ODBC 2.x or 3.x behavior also, as long as the application can call SQLSetEnvAttr. When using connection pooling, the application must not execute SQL statements that change the database or the context of the database, such as changing the database name, which changes the catalog used by a data source.
The ODBC driver is fully thread-safe, and connections do not have thread affinity to support connection pooling. This means the driver is able to handle calls on any thread at any time and is able to connect on one thread, to use the connection on another thread, and to disconnect on a third thread.