3.3.8. 기타

APPEND

예) INSERT /*+ APPEND */ INTO TAB2
    SELECT *
       FROM TAB1
     WHERE COL1 >= '20050101';


CACHE

예) SELECT /*+ FULL(t) CACHE(t) */ last_name
    FROM tech_spec t;

NOCAHCE

예) SELECT /*+ FULL(m) NOCACHE(m) */ member_name
      FROM member m;

CARDINALITY

예) SELECT /*+ CARDINALITY( s 9999 ) */ ...
      FROM sales s, prod p
      WHERE s.sales_date >= '20050901'
    AND p.prod_id LIKE 'ABEC%';	  

CURSOR_SHARING_EXACT

예) SELECT /*+ CURSOR_SHARING_EXACT */ * 
      FROM EMP
      WHERE ENAME = 'SCOTT';

DRIVING_SITE

예) SELECT /*+ DRIVING_SITE(b) */..........
     FROM cust a, order@ord_svr b
     WHERE a.join_date >= '20050101'
   AND b.order_date >= TO_CHAR(SYSDATE-7,'YYYYMMDD');

DYNAMIC_SAMPLING

예) SELECT /*+ DYNAMIC_SAMPLING(e 1) */ .....
     FROM EMP
     WHERE ENAME = 'SCOTT';
예) SELECT /*+ DYNAMIC_SAMPLING(e 1) */ count(*)
     FROM employees e;

PUSH_PRED

예) SELECT /* NO_MERGE(v) PUSH_PRED(v) */..........
     FROM member m,
    ( SELECT carrier_name, carrier_duration
       FROM member_carrier
       WHERE carrier_type IN ('1','2','4') ) v
 WHERE m.member_id = v.member_id(+)
      AND m.member_type=  '1001';

NO_PUSH_PRED

예) SELECT /* NO_MERGE(v) NO_PUSH_PRED(v) */..........
   FROM employees e,
    ( SELECT manager_id
       FROM employees) v        
 WHERE e.manager_id = v.manager_id(+)
     AND e.employee_id =  100';

PUSH_SUBQ

예) SELECT /*+ PUSH_SUBQ(@qb) */..........                 [INDEX: ITEM+SALTYPE+SALDATE]
     FROM sales
     WHERE item = :b1
    AND saltype IN (SELECT /*+ QB_NAME(qb) */ code_id
                           FROM code_table
		           WHERE code_type = 'SALTYPE' )
          AND  saldate between :b2 and :b3;


QB_NAME

예) SELECT /*+ UNNEST(@qb) */........
     FROM emp e
     WHERE e.deptno IN (SELECT /*+ QB_NAME(qb) */ d.deptno
                             FROM dept d
			     WHERE d.loc = 'DALLAS');


REWRITE_OR_ERROR

예) SELECT /*+ REWRITE_ OR_ERROR */ p.prod_subcatgory,
                      SUM(s.amount_sold)
     FROM sales s, products p
     WHERE s.prod_id = p.prod_id
     GROUP BY p.prod_subcatgory;
 
      ORA-30393: a query block in the statement did not rewrite
참조한문서

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