조인(join) 순서를 지시하는 힌트(hint)


보기:

SELECT /*+ LEADING(e2 e1) USE_NL(e1) INDEX(e1 emp_emp_id_pk) 
           USE_MERGE(j) FULL(j) */
    e1.first_name, e1.last_name, j.job_id, sum(e2.salary) total_sal
  FROM employees e1, employees e2, job_history j
  WHERE e1.employee_id = e2.manager_id
    AND e1.employee_id = j.employee_id
    AND e1.hire_date = j.start_date
  GROUP BY e1.first_name, e1.last_name, j.job_id
  ORDER BY total_sal;

http://docs.oracle.com/cd/B19306_01/server.102/b14211/hintsref.htm


아래 글도 참고

http://www.dbguide.net/db.db?mobile&cmd=view&boardUid=148222&boardConfigUid=9&categoryUid=216&boardIdx=140&boardStep=1

http://www.dbguide.net/db.db?cmd=view&boardUid=148218&boardConfigUid=9&categoryUid=216&boardIdx=139&boardStep=1