Multiple choice technology databases

Which two types of query results cannot be stored in the query result cache? (Choose two.)

  1. subquery results

  2. results of a query having the SYSDATE function

  3. results of a query having the GROUP BY clause

  4. results of a query having the DATE data type in the WHERE clause

Reveal answer Fill a bubble to check yourself
A,B Correct answer
Explanation

Subquery results cannot be stored in the query result cache because they represent intermediate results, making option A correct. Queries with SYSDATE function cannot be cached since SYSDATE returns different values on each execution, making option B correct. GROUP BY results and static DATE conditions in WHERE clauses can be cached, so options C and D are incorrect.

AI explanation

Oracle's query result cache has documented restrictions: results of subqueries aren't independently cacheable (only the outermost/top-level query result set is stored), and queries that reference non-deterministic constructs like SYSDATE (or CURRENT_DATE/CURRENT_TIMESTAMP, sequence NEXTVAL, etc.) are excluded because their result would become stale/incorrect on reuse. A GROUP BY clause doesn't prevent caching — aggregated result sets are cacheable — and having a DATE column in a WHERE clause is just a normal predicate with no bearing on cacheability. So the two correct exclusions are subquery results and SYSDATE-based queries.