목차

3.3.4. 조인 방법 선택용 힌트

USE_NL

NO_USE_NL

예) SELECT /*+ NO_USE_NL(l h) */.......
     FROM orders h, order_items l
     WHERE l.order_id, = h.order_id
   AND l.order_date >= '20050101';

USE_NL_WITH_INDEX

예) SELECT /*+ USE_NL_WITH_INDEX(l item_prod_ix) */....
    FROM orders hm order_items l
    WHERE l.order_id = h.order_id
   AND l.order_item like 'ADEN%'
   AND h.order_dt between '20051001' and '20051015';

USE_HASH

예) SELECT /*+ USE_HASH (a b) */...
     FROM sale a, pre_order b
     WHERE a.order_id = b.order_id
   AND a.sale_dt LIKE '2005%';
예) SELECT /*+ NO_USE_HASH(m d) */....
    FROM member m, dept d
    WHERE m.deptid = d.deptid;

USE_MERGE

예) SELECT /*+ USE_MERGE(a b) */.......
     FROM sale a, pre_order b
     WHERE a.order_id = b.order_id
         AND a.sale_dt BETWEEN '20050701' AND '20050930'
         AND b.cust_no = '101';

참조한문서

“오라클클럽” http://wiki.oracleclub.com/pages/viewpage.action?pageId=1966259&