Size the Cache Connection Pool

You can appropriately size the cache connection pool to avoid contention for connections with the ttCacheConnPoolSet built-in procedure.

The ttCacheConnPoolSet built-in procedure saves the values of these parameters in the Oracle database, which are then used as the default values when restarting the TimesTen server. Once applied to each TimesTen server, the values specified are used for the cache connection pool across all client/server applications for a TimesTen database.

If you want to modify these values after the TimesTen server starts, you can change the cache connection pool sizing parameters on the Oracle database using the ttCacheConnPoolSet built-in procedure. After which, you can re-initialize the TimesTen server by either:

  • Restarting the TimesTen server to re-initialize the server (and all child server processes) with the new sizing parameters.

  • Dynamically re-initializing each TimesTen server with the cache connection pool parameters saved on the Oracle database with the ttCacheConnPoolApply built-in procedure. See Dynamically Applying Cache Connection Pool Sizing Modifications.

You can run the ttCacheConnPoolSet built-in procedure from a direct connection, a single-threaded client/server connection or a multithreaded client/server connection.

Note:

See the ttCacheConnPoolSet in the Oracle TimesTen In-Memory Database Reference.

For example, the following initiates the minimum and maximum number of pooled connections to be between 10 and 32 connections and the increment is 1. The maximum idle time by the client is set to 10 seconds. And all dynamic load operations will wait for an available connection from the cache connection pool.

Command> call ttCacheConnPoolSet(10, 32, 1, 10, 0);

Set the minimum and maximum size of the cache connection pool to levels where connections are available when needed. If no connections are available in the pool, dynamic load operations stall until a connection from the pool is available (unless you set ConnNoWait=1). If a connection to the Oracle database times out, you receive an error denoting a loss of the connection, sometimes requiring a rollback on TimesTen.

You can query what the cache connection pool parameters are with the ttCacheConnPoolGet built-in procedure.

See Example Demonstrating Management of the Cache Connection Pool.