Database connection pools are a common way to improve the performance of database operations. They can be useful because creating a new connection can easily take several seconds to establish; this is a problem when the database operation is one that only needs a few milliseconds. DatabaseLink provides a connection pool mechanism built on top of the Apache Commons DBCP, http://jakarta.apache.org/commons/dbcp/index.html.
Working with Connection Pools
If you find that the examples in this tutorial do not work as shown, you may need to install or restore the example database with the "DatabaseLink`DatabaseExamples`" package, as described in "Using the Example Databases".
To create a connection from a pool, you can set the UseConnectionPool option of OpenSQLConnection. Here is an example.
First, the DatabaseLink package is loaded. Then a connection using a pool is made to the publisher example database.