In the WebSphere® administrative console, create a new connection pool with the following attributes.
Attribute | Value |
---|---|
Minimum pool size | Initial number of connections to create for the connection pool. If the pool is allowed to shrink, it does not shrink below this number. See below for recommendations. |
Maximum pool size | Maximum number of connections that can be created for this pool. See below for recommendations. |
Statement cache size | The maximum number of prepared statements to cache for the data source. |
IBM® recommends that you benchmark your application before migration to production to ensure that these values are set optimally. IBM also recommends that you continually monitor the connection pool usage levels to ensure that these parameters are set optimally.
Bear in mind the following guidelines when setting the minimum pool size attribute:
This attribute sets the maximum number of connections the pool can grow to within a single WebSphere instance. If you set this value to 20 and you have ten WebSphere instances, in theory, WebSphere could create 200 database connections.
Bear in mind the following guidelines when setting the maximum pool size attribute:
This attribute tells WebSphere to create a cache at the data source level to store prepared statements up to the value specified.
Prepared statements are precompiled SQL statements that can be repeatedly invoked with different parameter values. Prepared statements reduce the need to compile the SQL statements.
To disable prepared statement caching, set the prepared statement cache size to 0. To use the cache, you can set a value to a higher value.