1Z0-060 · Question #203
Which three statements are true about the use of the query result cache? (Choose three.)
The correct answer is A. Results obtained from a query rewrite to a materialized view may be stored in the query result B. Stale results may still be obtained from the query result cache, if the query session's parameter is E. Results may not be obtained from the query result cache, when the query_rewrite_enabled. Oracle's query result cache supports caching of materialized view rewrite results and can return stale data under certain session parameter configurations, while query_rewrite_enabled affects whether cached results can be served.
Question
Which three statements are true about the use of the query result cache? (Choose three.)
Options
- AResults obtained from a query rewrite to a materialized view may be stored in the query result
- BStale results may still be obtained from the query result cache, if the query session's parameter is
- CResults obtained from a join between a table and a view may be stored in the query result cache.
- DResults from distributed queries are never stored in the query result cache.
- EResults may not be obtained from the query result cache, when the query_rewrite_enabled
- FResults from remote queries may sometimes be stored in the query result cache.
How the community answered
(41 responses)- A76% (31)
- C15% (6)
- D2% (1)
- F7% (3)
Why each option
Oracle's query result cache supports caching of materialized view rewrite results and can return stale data under certain session parameter configurations, while query_rewrite_enabled affects whether cached results can be served.
Oracle permits results from queries that were transparently rewritten by the optimizer to use a materialized view to be stored in the result cache. This allows subsequent identical queries to benefit from both the materialized view optimization and the result cache hit, reducing redundant computation.
When a session has RESULT_CACHE_MODE set to FORCE or similar settings, Oracle may serve a cached result before the underlying data change has triggered cache invalidation. This staleness window exists because invalidation is event-driven but not always instantaneous across all cache entries.
Joins involving views that contain non-deterministic functions, sequence references, or other non-cacheable constructs prevent the result from being stored in the query result cache, as Oracle cannot guarantee stable invalidation semantics.
This statement incorrectly asserts an absolute restriction - Oracle result cache behavior with distributed queries has nuances based on object types and hints used, making the blanket claim of 'never' inaccurate.
Setting query_rewrite_enabled to FALSE disables the query rewrite mechanism that the result cache relies on for certain cached plans. When this parameter is disabled, Oracle cannot retrieve matching results from the result cache for queries that would otherwise qualify.
Oracle does not store results from queries that reference remote objects via database links in the result cache because it cannot track DDL or DML changes on remote databases for reliable cache invalidation.
Concept tested: Oracle query result cache eligibility and parameter interactions
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/tgdba/tuning-result-cache.html
Topics
Community Discussion
No community discussion yet for this question.