jonas_li 发表于 2013-12-18 15:14
执行计划也可以贴出来,看看,是否真的如此
Execution Plan
----------------------------------------------------------
Plan hash value: 454689222
-----------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1729 | 288K|389 (2)| 00:00:05 |
|* 1 | HASH JOIN | | 1729 | 288K|389 (2)| 00:00:05 |
| 2 | VIEW | | 1479 | 196K| 8 (13)| 00:00:01 |
| 3 | HASH GROUP BY | | 1479 | 1441K| 8 (13)| 00:00:01 |
|* 4 | FILTER | | | | | |
| 5 | NESTED LOOPS OUTER | | 1479 | 1441K| 7 (0)| 00:00:01 |
| 6 | NESTED LOOPS | | 1479 | 1198K| 7 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | A | 3 | 42 | 7 (0)| 00:00:01 |
|* 8 | TABLE ACCESS BY INDEX ROWID| B | 430 | 342K| 0 (0)| 00:00:01 |
|* 9 | INDEX RANGE SCAN | INX_A | 7464 | | 0 (0)| 00:00:01 |
| 10 | TABLE ACCESS BY INDEX ROWID | D | 1 | 168 | 0 (0)| 00:00:01 |
|* 11 | INDEX UNIQUE SCAN | PK_D | 1 | | 0 (0)| 00:00:01 |
|* 12 | TABLE ACCESS FULL | C | 68087 | 2327K|380 (2)| 00:00:05 |
-----------------------------------------------------------------------------------------------------
Execution Plan
----------------------------------------------------------
Plan hash value: 454689222
-----------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1710 | 285K|389 (2)| 00:00:05 |
|* 1 | HASH JOIN | | 1710 | 285K|389 (2)| 00:00:05 |
| 2 | VIEW | | 1463 | 194K| 8 (13)| 00:00:01 |
| 3 | HASH GROUP BY | | 1463 | 1425K| 8 (13)| 00:00:01 |
|* 4 | FILTER | | | | | |
| 5 | NESTED LOOPS OUTER | | 1463 | 1425K| 7 (0)| 00:00:01 |
| 6 | NESTED LOOPS | | 1463 | 1185K| 7 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | A | 3 | 42 | 7 (0)| 00:00:01 |
|* 8 | TABLE ACCESS BY INDEX ROWID| B | 425 | 338K| 0 (0)| 00:00:01 |
|* 9 | INDEX RANGE SCAN | INX_A | 7464 | | 0 (0)| 00:00:01 |
| 10 | TABLE ACCESS BY INDEX ROWID | D | 1 | 168 | 0 (0)| 00:00:01 |
|* 11 | INDEX UNIQUE SCAN | PK_D | 1 | | 0 (0)| 00:00:01 |
|* 12 | TABLE ACCESS FULL | C | 68087 | 2327K|380 (2)| 00:00:05 |
-----------------------------------------------------------------------------------------------------