JBoss.orgCommunity Documentation

Chapter 5. Cache Hint

5.1. ResultSet Cache Query
5.2. Materialized Views
5.2.1. TTL Snapshot Refresh
5.2.2. Updatable
5.3. Limitations

A cache hint can be used to:

/*+ cache[([pref_mem] [ttl:n] [updatable])] */

The most basic form of the cache hint, /*+ cache */, is sufficient to inform the engine that the results of the non-update command should be cached.


The pref_mem and ttl options may also be used for ResultSet cache queries, however updatable only has an effect on materialized view tables.


See the ResultSet Caching Chapter for more.

The cache hint, when used in the context of an internal materialized view transformation query, provides the ability to fine tune the materializated table. The hint is not used for materialization targeted at an external source. See the Materialized View Chapter for more on materialized views.

The pref_mem option also applies to internal materialized views. Internal table index pages already have a memory preference, so the perf_mem option indicates that the data pages should prefer memory as well.