Skip navigation.
Downloads | Product Documentation | Support

Administration Console Online Help

# Configure the statement cache for a JDBC connection pool

To improve performance, WebLogic Server can cache prepared and callable statements used in your applications (enabled by default). When an application or EJB calls any of the statements stored in the cache, WebLogic Server reuses the statement stored in the cache. Each database connection in a data source has it's own statement cache. For more information, see Increasing Performance with the Statement Cache.

To configure the statement cache for a JDBC data source:

1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
2. In the Domain Structure tree, expand Services > JDBC, then select Data Sources.
3. On the Summary of Data Sources page, click the data source name.
4. Select the Configuration: Connection Pool tab.
5. In Statement Cache Type, select one of the following options:
   - LRU - After the Statement Cache Size is met, the Least Recently Used statement is removed when a new statement is used.
   - Fixed - The first Statement Cache Size number of statements is stored and stay fixed in the cache. No new statements are cached unless the cache is manually cleared or the cache size is increased.

   See Configuration Options for more information.

6. In Statement Cache Size, enter the number of statements to cache per connection per data source instance.
7. Click Save.
8. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
   Not all changes take effect immediately—some require a restart (see Use the Change Center).