执行计划 plan hash value

v$sql(hash_value,old_hash_value,plan_hash_value)

执行计划的hash值应该是plan_hash_value 而不是hash_value

SQL> explain plan for select * from oe.orders where rownum<=10;

Explained.

SQL> select plan_table_output from table(dbms_xplan.display());

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 335441244

-----------------------------------------------------------------------------
| Id  | Operation    | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |     |  10 | 370 |   2   (0)| 00:00:01 |
|*  1 |  COUNT STOPKEY    |     |     |     |   |     |
|   2 |   TABLE ACCESS FULL| ORDERS |  10 | 370 |   2   (0)| 00:00:01 |
------------------------------------------

你可能感兴趣的:(数据库)