Oracle Text provides a cache layer called the query filter cache that can be used to cache the query results. The query filter cache is sharable across queries. Thus, the cached query results can be reused by multiple queries, improving the query response time.
The ctxfiltercache
operator should be used to specify which query results to cache. The following example uses the ctxfiltercache
operator to store the results of the common_predicate
query in the cache:
select * from docs where contains(txt, 'ctxfiltercache((common_predicate), FALSE)')>0;
In the following example, the cached results of the common_predicate
query are reused by the new_query
query, thus improving the query response time.
select * from docs where contains(txt, 'new_query & ctxfiltercache((common_predicate), FALSE)')>0;
Oracle Text Reference for more information about:
ctxfiltercache
operator
query_filter_cache_size
basic storage attribute
ctx_filter_cache_statistics
view