11:02:19 sys@EPOS03-EPOS03(2153,2651)(3740118,3375408)> select * from table(dbms_xplan.display_awr('gtn89bhjhfa56'));
PLAN_TABLE_OUTPUT
------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID gtn89bhjhfa56
--------------------
SELECT PK_NO FROM STK_IO_MAS WHERE ORG_NO = :1 AND LOC_NO = :1 AND MAS_CODE = 'STKTOUTR'
AND WORK_NO = :1 AND WH_C1 = :1 AND WH_C2 = :1 AND STATUS_FLG = 'A' ORDER BY PK_NO
Plan hash value: 658132297
------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | | 3740 (100)| |
| 1 | SORT ORDER BY | | 1 | 42 | | 3740 (1)| 00:00:45 |
| 2 | TABLE ACCESS BY INDEX ROWID | STK_IO_MAS | 1 | 42 | | 3739 (1)| 00:00:45 |
| 3 | BITMAP CONVERSION TO ROWIDS | | | | | | |
| 4 | BITMAP AND | | | | | | |
| 5 | BITMAP CONVERSION FROM ROWIDS| | | | | | |
| 6 | SORT ORDER BY | | | | | | |
| 7 | INDEX RANGE SCAN | UNQ_STK_IO_MAS | 15487 | | | 121 (0)| 00:00:02 |
| 8 | BITMAP CONVERSION FROM ROWIDS| | | | | | |
| 9 | SORT ORDER BY | | | | 7400K| | |
| 10 | INDEX RANGE SCAN | I_STK_IO_MAS1 | 15487 | | | 878 (1)| 00:00:11 |
------------------------------------------------------------------------------------------------------------
SQL_ID gtn89bhjhfa56
--------------------
SELECT PK_NO FROM STK_IO_MAS WHERE ORG_NO = :1 AND LOC_NO = :1 AND MAS_CODE =
'STKTOUTR' AND WORK_NO = :1 AND WH_C1 = :1 AND WH_C2 = :1 AND STATUS_FLG = 'A'
ORDER BY PK_NO
Plan hash value: 3089495652
-----------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 15262 (100)| |
| 1 | SORT ORDER BY | | 1 | 42 | 15262 (1)| 00:03:04 |
| 2 | TABLE ACCESS BY INDEX ROWID| STK_IO_MAS | 1 | 42 | 15261 (1)| 00:03:04 |
| 3 | INDEX RANGE SCAN | UNQ_STK_IO_MAS | 26643 | | 210 (1)| 00:00:03 |
-----------------------------------------------------------------------------------------------
SQL_ID gtn89bhjhfa56
--------------------
SELECT PK_NO FROM STK_IO_MAS WHERE ORG_NO = :1 AND LOC_NO = :1 AND
MAS_CODE = 'STKTOUTR' AND WORK_NO = :1 AND WH_C1 = :1 AND WH_C2 =
:1 AND STATUS_FLG = 'A' ORDER BY PK_NO
Plan hash value: 3674081066
---------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 18967 (100)| |
| 1 | SORT ORDER BY | | 1 | 42 | 18967 (2)| 00:03:48 |
| 2 | TABLE ACCESS FULL| STK_IO_MAS | 1 | 42 | 18966 (2)| 00:03:48 |
---------------------------------------------------------------------------------
56 rows selected.
大家帮忙看一下 一条SQL出来三个执行计划