14.58 RESULT_CACHE Clause
Indicates to store the function results into the server result cache.
RESULT_CACHE clause can appear in the following SQL statements:
Topics
Syntax
result_cache_clause ::=
Semantics
result_cache_clause
result_cache_clause can appear only once in the function.
RESULT_CACHE
To make a function result-cached, include the RESULT_CACHE clause in the function definition. If you declare the function before defining it, you must also include the RESULT_CACHE option in the function declaration.
Restriction on RESULT_CACHE
-
RESULT_CACHEis disallowed on functions withOUTorINOUTparameters. -
RESULT_CACHEis disallowed on functions withINorRETURNparameter of (or containing) these types:-
BLOB -
CLOB -
NCLOB -
REFCURSOR -
Collection
-
Object
-
Record or PL/SQL collection that contains an unsupported return type
-
-
RESULT_CACHEis disallowed on function in an anonymous block. -
RESULT_CACHEis disallowed on pipelined table function, nested function and SQL macro.
RELIES_ON
Specifies the data sources on which the results of the function depend. Each data_source is the name of either a database table or view.
Note:
-
This clause is deprecated. As of Oracle Database 12c, the database detects all data sources that are queried while a result-cached function is running, and
RELIES_ONclause does nothing. -
You cannot use
RELIES_ONclause in a function declared in an anonymous block.
Examples
Related Topics
In this chapter:
In other chapters:
In other books:
