A table has three distinct values in its ID column. In the ID column, values 10 and 20 have more
than 20000 rows each and value 30 has only five rows. The statistics for the schema have been
updated recently.
The CURSOR_SHARING parameter is set to EXACT.
The query was executed recently and the cursor for the query is bind aware. Examine the exhibits
to view the commands executed.
You plan to execute the same query with a value of 30 for the bind variable V_ID.
Which statement is true in this scenario?
A.
The same execution plan will always be used irrespective of the value in the bind variable.
B.
A new execution plan will be generated depending on the access pattern and the bind value.
C.
Adaptive cursor sharing will ensure that a new cursor is generated for each distinct value in the
bind variable.
D.
Adaptive cursor sharing will happen only if you use the literal values instead of bind variables in
the query.
Explanation:
Note:
* CURSOR_SHARING determines what kind of SQL statements can share the same cursors.
* Setting CURSOR_SHARING to EXACT allows SQL statements to share the SQL area only
when their texts match exactly. This is the default behavior. Using this setting, similar statements
cannot shared; only textually exact statements can be shared.
* Values:
* FORCE
Forces statements that may differ in some literals, but are otherwise identical, to share a cursor,
unless the literals affect the meaning of the statement.
* SIMILAR
Causes statements that may differ in some literals, but are otherwise identical, to share a cursor,
unless the literals affect either the meaning of the statement or the degree to which the plan is
optimized.
* EXACT
Only allows statements with identical text to share the same cursor.
B should be correct.
Bind aware cursor means than the database can change the execution plan depending on the value of bind variable.
C seems to be incorrect because there’s no need to have a single different cursor for each bind variable.
I agree with vasya. B is correct.
B