it江湖漂,怎能不挨刀;一朝机器当,看你怎么着!
分类: LINUX
2010-06-30 17:30:00
1 那么当我们调整sql时候 会用到explain获得执行计划
SQL> explain plan for select * from t1 where a>:a ;
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan
hash value: 2059591622
2 SQL> set autotrace traceonly explain;
SQL> select count(*) from cisco.userinfo;
Execution Plan
----------------------------------------------------------
-------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)|
-------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 10 (0)|
| 1 | SORT AGGREGATE | | 1 | |
| 2 | INDEX FAST FULL SCAN| SYS_C0051351 | 17523 | 10 (0)|
-------------------------------------------------------------------