|
16:19:35 SQL> SELECT child_number, executions, buffer_gets, is_bind_sensitive, is_bind_aware, is_shareable FROM v$sql WHERE sql_id = '3aajxkvtwhz38' ;
CHILD_NUMBER EXECUTIONS BUFFER_GETS I I I
------------ ---------- ----------- - - -
0 3 277 Y N Y
16:20:39 SQL> print :x
X
----------
0
SQL> Select /*+ gather_plan_statistics */ * from T where n=:x;
0 ****************************************************************************************************
0 ****************************************************************************************************
9900 rows selected.
16:21:08 SQL> SELECT * FROM table(dbms_xplan.display_cursor(NULL, NULL,'ALLSTATS LAST +PEEKED_BINDS'));
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID 3aajxkvtwhz38, child number 0
-------------------------------------
Select /*+ gather_plan_statistics */ * from T where n=:x
Plan hash value: 2912310446
-----------------------------------------------------------------------------------------------
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
-----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | | 9900 |00:00:00.02 | 269 |
| 1 | TABLE ACCESS BY INDEX ROWID| T | 1 | 1 | 9900 |00:00:00.02 | 269 |
|* 2 | INDEX RANGE SCAN | I_T_N | 1 | 1 | 9900 |00:00:00.01 | 69 |
-----------------------------------------------------------------------------------------------
Peeked Binds (identified by position):
--------------------------------------
1 - (NUMBER): 1
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("N"=:X)
24 rows selected.
--执行计划没变。
SQL> SELECT child_number, executions, buffer_gets, is_bind_sensitive, is_bind_aware, is_shareable FROM v$sql WHERE sql_id = '3aajxkvtwhz38' ;
CHILD_NUMBER EXECUTIONS BUFFER_GETS I I I
------------ ---------- ----------- - - -
0 4 546 Y N Y
|
|