03D
Less than 1 minute
D-03d
JOIN
๋ฐฉ์
OUTER JOIN
NESTED LOOP JOIN
- SQL ๋ฌธ
SELECT A.DNAME, B.ENAME, B.SAL
FROM EMP B, DEPT A
WHERE A.DEPTNO = B.DEPTNO
AND B.SAL > 200
AND A.LOCATION = 'DALLAS'
- ์คํ๊ณํ NESTED LOOP TABLE ACCESS (BY INDEX ROWID) OF
DEPT
(TABLE) INDEX (RANGE SCAN) OFDEPT_IDX
(INDEX) TABLE ACCESS (BY INDEX ROWID) OFEMP
(TABLE) INDEX (RANGE SCAN) OFEMP_IDX
(INDEX)
SORT MERGE JOIN
HASH JOIN
- Hash area size ๊ด๋ฆฌ ์ค์ (ํ์ ์ ๊ณต๊ฐ)
- Hash ํจ์๋ฅผ ์ฌ์ฉ
- ๋ง์ ๋ถํ ๋ฐ์ (๋ด๋ถ์์ ์ฌ์ฉ์ด ๋ง์ 0)
select /*+ LEADING(A) FULL(A) FULL(B) USE_HASH(A B) */
A.CARD__NO A.CRE_DT, B.STORE_ID, B.AMOUNT
FROM CARD A, TRX_LIST B
WHERE A.CARD=NO = B.CARD_NO
AND A.CRE_DT >= 20160115
AND B.TRX_DT >= 20160115
SEMI JOIN
select DEPTNO
from DEPT a
where EXISTS(select 'X',
from emp B
where a.deptno = b.deptno)