nerdexam
Oracle

1Z0-146 · Question #148

Which two statements are true about the query results stored in the query result cache? (Choose two.)

The correct answer is A. If any of the tables used to build a query is modified by an ongoing transaction in the current session, B. A query result based on a read-consistent snapshot of data that is older than the latest committed. For a snapshot to be reusable, it must have read consistency. For a result set to be eligible for caching, at least one of the following conditions must be true: - The read-consistent snapshot used to build the result must retrieve the most current, committed state of the data…

Improving PL/SQL Performance

Question

Which two statements are true about the query results stored in the query result cache? (Choose two.)

Options

  • AIf any of the tables used to build a query is modified by an ongoing transaction in the current session,
  • BA query result based on a read-consistent snapshot of data that is older than the latest committed
  • CAdding the RESULT_CACHE hint to inline views enables optimizations between the outer query and
  • DA query result for a query that has a bind variable is stored in the cache and is reused if the query is

How the community answered

(26 responses)
  • A
    69% (18)
  • C
    8% (2)
  • D
    23% (6)

Explanation

For a snapshot to be reusable, it must have read consistency. For a result set to be eligible for caching, at least one of the following conditions must be true: - The read-consistent snapshot used to build the result must retrieve the most current, committed state of the data. - The query points to an explicit point in time using flashback query. If the current session has an active transaction referencing objects in a query, then the results from this query are not eligible for caching. Adding the RESULT_CACHE hint to inline views disables optimizations between the outer query and inline view to maximize reusability of the cached result. Cache results can be reused if they are parameterized with variable values when queries are equivalent and the parameter values are the same.

Topics

#query result cache#RESULT_CACHE hint#cache invalidation#bind variables

Community Discussion

No community discussion yet for this question.

Full 1Z0-146 Practice