Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 









OCI Consistent Client Cache

Oracle 11g New Features Tips by Donald BurlesonJune 29, 2015

Oracle OCI Consistent Client Cache

Oracle 11g introduces a number of features to expand the use of memory caching in order to improve query performance.  These features also decrease the overall memory requirements of queries and applications. 

In addition to the features that support server-side caching, which is discussed in Chapter 6, there is also a new feature to support a client-side result cache that allows OCI clients to fetch result sets stored in process memory instead of requiring access to the server's memory.  The Client Result Cache is enabled and configured at the database level and available to all OCI-based clients. 

Also see how to activate Oracle Client Caching for OCI Applications.

Using the client's memory to cache query result sets significantly improves the performance of repetitive queries by OCI-based clients that would otherwise require a cache hit on the server-side.  The client cache utilizes per-process memory on the OCI client and its contents can be shared across multiple sessions and threads. 

When executing repetitive queries, the clients fetch results directly from the client cache rather than having the server execute the query.  In certain situations, this will greatly reduce the number of round-trips between the client and the database server.  This also reduces CPU consumption on the server and greatly increases the query response times.  Situations that will benefit most from the client cache are queries that use small lookup tables or mostly read-only tables. 

The consistency between the client cache and the database server is managed internally by the database, and is a feature available to all OCI clients. 

Configuring the Client Cache from the Database

The current client cache initialization parameters can be viewed by using:

SQL> show parameter client_result

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----
client_result_cache_lag              big integer 3000
client_result_cache_size             big integer 0


To enable the client cache, the initialization parameter client_result_cache_size must be set to a value greater than zero since the value of zero disables the client cache.  This parameter is the maximum size of the client-per-process result set cache.  All OCI client processes get this maximum size.

The client_result_cache_lag parameter specifies the maximum amount of time, in milliseconds, that the client result cache can lag behind any changes in the database that affect the result sets.  By default, the value is 3000ms (or three seconds).  Since ideally this feature is used for read-only tables, this setting should not have a significant impact on the consistency of the cached results. 

Both of these initialization parameters are static parameters. This being, changing their values should be done with SCOPE=SPFILE and any new values will not become effective until the database is restarted.  For example, to enable the client cache with a value of 2M for the client cache, issue the following:

SQL> alter system set client_result_cache_size=2M scope=SPFILE;
System altered.

After restarting the database, the new settings have taken effect:

SQL> show parameter client_result

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----
client_result_cache_lag              big integer 3000
client_result_cache_size             big integer 2M



This is an excerpt from the new book Oracle 11g New Features: Expert Guide to the Important New Features by John Garmany, Steve Karam, Lutz Hartmann, V. J. Jain, Brian Carr.

You can buy it direct from the publisher for 30% off.


Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.