Az alábbiakban megadok néhány példát, hintek használatára. A hint nélkül másik végrehajtási tervet választana az adatbáziskezelő. ---------------------------------------------------------------------- SELECT /*+ full(emp) */ deptno FROM dept MINUS SELECT /*+ full(emp) */ deptno FROM emp; SELECT /*+ full(emp) */ deptno FROM dept INTERSECT SELECT /*+ full(emp) */ deptno FROM emp; SELECT ename FROM emp WHERE deptno IN (SELECT /*+ no_unnest */ deptno FROM dept WHERE loc='DALLAS'); SELECT ename FROM emp WHERE deptno IN (SELECT /*+ nl_sj */ deptno FROM dept WHERE loc='DALLAS'); SELECT ename FROM emp WHERE deptno IN (SELECT /*+ merge_sj */ deptno FROM dept WHERE loc='DALLAS'); SELECT ename FROM emp WHERE NOT EXISTS (SELECT /*+ no_unnest */ * FROM dept WHERE emp.deptno=dept.deptno AND loc='DALLAS'); SELECT ename FROM emp WHERE NOT EXISTS (SELECT /*+ nl_aj */ * FROM dept WHERE emp.deptno=dept.deptno AND loc='DALLAS'); SELECT /*+ and_equal(sz, szt_ckod, szt_szkod) */ sum(mennyiseg) FROM nikovits.szallit sz WHERE ckod=9 and szkod=9; SELECT /*+ use_concat */ sum(mennyiseg) FROM nikovits.szallit sz WHERE ckod=9 or szkod=9; --1 sec SELECT /*+ full(c) use_nl(c, sz) */ SUM(mennyiseg) FROM nikovits.cikk c, nikovits.szallit sz WHERE c.ckod < 999; -- 20 sec SELECT /*+ use_nl(c, sz) */ * FROM nikovits.cikk c, nikovits.szallit sz ORDER BY c.ckod; SELECT /*+ leading(sz) no_index(p) no_index(c) */ p.pkod, AVG(mennyiseg) FROM nikovits.cikk c, nikovits.szallit sz, nikovits.projekt p WHERE c.ckod=sz.ckod AND p.pkod=sz.pkod GROUP BY p.pkod;