时间:2021-07-01 10:21:17 帮助过:26人阅读
SQL> explain plan for select a.object_name,b.object_id
from static_test a,static_test1 b
where a.object_id=b.object_id;  2    3  
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
-------------------------------------------------------------------------------------------------
Plan hash value: 1637592733
------------------------------------------------------------------------------------------------
| Id  | Operation		     | Name	       | Rows  | Bytes | Cost (%CPU)| Time     |
------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT	     |		       |     1 |    35 |   344	 (0)| 00:00:05 |
|   1 |  NESTED LOOPS		     |		       |     1 |    35 |   344	 (0)| 00:00:05 |
|   2 |   NESTED LOOPS		     |		       |     1 |    35 |   344	 (0)| 00:00:05 |
|   3 |    TABLE ACCESS FULL	     | STATIC_TEST1    |     1 |     5 |   343	 (0)| 00:00:05 |
|*  4 |    INDEX RANGE SCAN	     | STATIC_TEST_IDX |     1 |       |     1	 (0)| 00:00:01 |
|   5 |   TABLE ACCESS BY INDEX ROWID| STATIC_TEST     |     1 |    30 |     1	 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
4 - access("A"."OBJECT_ID"="B"."OBJECT_ID")
17 rows selected.
 
SQL执行异常系列之——统计信息不准
标签:loop object_id alt cpu 就会 from ops HERE 信息