1 . 실행 계획
Plan hash value: 85585325
--------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 43 | 204K| 3 (34)| 00:00:01 |
|* 1 | TABLE ACCESS FULL | TB_FAV_COUPON | 1 | 48 | 2 (0)| 00:00:01 |
| 2 | SORT AGGREGATE | | 1 | 13 | | |
|* 3 | INDEX RANGE SCAN | CM_SEQ_TB_COUPON_DETAIL | 1 | 13 | 1 (0)| 00:00:01 |
|* 4 | VIEW | | 1 | 525 | 3 (34)| 00:00:01 |
|* 5 | WINDOW SORT PUSHED RANK | | 1 | 538 | 3 (34)| 00:00:01 |
|* 6 | TABLE ACCESS FULL | TB_STORE_IMAGES | 1 | 538 | 2 (0)| 00:00:01 |
|* 7 | VIEW | | 43 | 204K| 3 (34)| 00:00:01 |
| 8 | COUNT | | | | | |
| 9 | VIEW | | 43 | 203K| 3 (34)| 00:00:01 |
| 10 | SORT ORDER BY | | 43 | 62995 | 3 (34)| 00:00:01 |
| 11 | NESTED LOOPS | | | | | |
| 12 | NESTED LOOPS | | 43 | 62995 | 2 (0)| 00:00:01 |
| 13 | NESTED LOOPS | | 43 | 39044 | 2 (0)| 00:00:01 |
| 14 | TABLE ACCESS BY INDEX ROWID| TB_COUPON | 86 | 54266 | 2 (0)| 00:00:01 |
|* 15 | INDEX RANGE SCAN | MULTI_TB_COUPON | 1 | | 1 (0)| 00:00:01 |
|* 16 | TABLE ACCESS BY INDEX ROWID| TB_STORE | 1 | 277 | 0 (0)| 00:00:01 |
|* 17 | INDEX UNIQUE SCAN | PK_TB_STORE | 1 | | 0 (0)| 00:00:01 |
|* 18 | INDEX UNIQUE SCAN | PK_TB_BRAND | 1 | | 0 (0)| 00:00:01 |
|* 19 | TABLE ACCESS BY INDEX ROWID | TB_BRAND | 1 | 557 | 0 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------------------
2.실행계획
Plan hash value: 912651940
---------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 11 | 53570 | 6 (34)| 00:00:01 |
|* 1 | TABLE ACCESS FULL | TB_FAV_COUPON | 1 | 48 | 2 (0)| 00:00:01 |
|* 2 | VIEW | | 1 | 525 | 3 (34)| 00:00:01 |
|* 3 | WINDOW SORT PUSHED RANK | | 1 | 538 | 3 (34)| 00:00:01 |
|* 4 | TABLE ACCESS FULL | TB_STORE_IMAGES | 1 | 538 | 2 (0)| 00:00:01 |
|* 5 | VIEW | | 11 | 53570 | 6 (34)| 00:00:01 |
| 6 | COUNT | | | | | |
| 7 | VIEW | | 11 | 53427 | 6 (34)| 00:00:01 |
| 8 | SORT ORDER BY | | 11 | 16401 | 6 (34)| 00:00:01 |
|* 9 | HASH JOIN RIGHT OUTER | | 11 | 16401 | 5 (20)| 00:00:01 |
| 10 | VIEW | | 31 | 806 | 2 (0)| 00:00:01 |
| 11 | HASH GROUP BY | | 31 | 806 | 2 (0)| 00:00:01 |
|* 12 | TABLE ACCESS BY INDEX ROWID | TB_COUPON_DETAIL | 31 | 806 | 2 (0)| 00:00:01 |
| 13 | INDEX FULL SCAN | CM_SEQ_TB_COUPON_DETAIL | 31 | | 1 (0)| 00:00:01 |
| 14 | NESTED LOOPS | | | | | |
| 15 | NESTED LOOPS | | 11 | 16115 | 2 (0)| 00:00:01 |
| 16 | NESTED LOOPS | | 11 | 9988 | 2 (0)| 00:00:01 |
| 17 | TABLE ACCESS BY INDEX ROWID| TB_COUPON | 86 | 54266 | 2 (0)| 00:00:01 |
|* 18 | INDEX RANGE SCAN | MULTI_TB_COUPON | 1 | | 1 (0)| 00:00:01 |
|* 19 | TABLE ACCESS BY INDEX ROWID| TB_STORE | 1 | 277 | 0 (0)| 00:00:01 |
|* 20 | INDEX UNIQUE SCAN | PK_TB_STORE | 1 | | 0 (0)| 00:00:01 |
|* 21 | INDEX UNIQUE SCAN | PK_TB_BRAND | 1 | | 0 (0)| 00:00:01 |
|* 22 | TABLE ACCESS BY INDEX ROWID | TB_BRAND | 1 | 557 | 0 (0)| 00:00:01 |
---------------------------------------------------------------------------------------------------------------
위에 두 실행계획을 비교 해볼때 결론이 Plan Hash value 가 낮을 수록 좋다라고
즉 1번 실행계획이 효율적이다 라고 나름 결론을 내렸는데 맞나요?
조언좀 부탁드립니다,,