SQL> select /*+gather_plan_statistics*/* from scott.emp where ename='KING' ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7839 KING PRESIDENT 17-NOV-81 5000
10
SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
SQL_ID 22pgw3847m43u, child number 0
-------------------------------------
select /*+gather_plan_statistics*/* from scott.emp where ename='KING'
Plan hash value: 3956160932
--------------------------------------------------------------------------------
----
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffe
rs |
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----
| 0 | SELECT STATEMENT | | 1 | | 1 |00:00:00.01 |
8 |
|* 1 | TABLE ACCESS FULL| EMP | 1 | 1 | 1 |00:00:00.01 |
8 |
--------------------------------------------------------------------------------
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
----
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("ENAME"='KING')
18 rows selected.
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7839 KING PRESIDENT 17-NOV-81 5000
10
SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
SQL_ID 22pgw3847m43u, child number 0
-------------------------------------
select /*+gather_plan_statistics*/* from scott.emp where ename='KING'
Plan hash value: 3956160932
--------------------------------------------------------------------------------
----
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffe
rs |
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----
| 0 | SELECT STATEMENT | | 1 | | 1 |00:00:00.01 |
8 |
|* 1 | TABLE ACCESS FULL| EMP | 1 | 1 | 1 |00:00:00.01 |
8 |
--------------------------------------------------------------------------------
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
----
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("ENAME"='KING')
18 rows selected.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22569416/viewspace-1977593/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22569416/viewspace-1977593/