Oracle Database: Program with PL/SQL — Question 57
You created a PL/SQL function with the RESULT_CACHE clause, which calculates a percentage of total marks for each student by querying the MARKS table.
Under which two circumstances will the cache for this function not be used and the function body be executed instead?
Answer options
- A. When a user fixes incorrect marks for a student, with an update to the MARKS table, and then executes the function in the same session
- B. When the amount of memory allocated for the result cache is increased
- C. When the function is executed in a session frequently with the same parameter value
- D. When the database administrator disables the result cache during ongoing application patching
- E. When the maximum amount of server result cache memory that can be used for a single result is set to 0.
Correct answer: D, E
Explanation
The correct answers D and E indicate scenarios where the result cache will not be utilized. Disabling the result cache during application patching (D) prevents any caching from taking place, while setting the maximum cache memory to 0 (E) means no results can be cached. The other options do not affect the cache mechanism directly and would still allow the function to use the cache.