skip to main content
Designing and coding the IP : Join processing : Join algorithm : Join condition order
 

Join condition order

The following query shows the selection process for join condition-based ordering:
SELECT * FROM emp, dept, div
WHERE emp.deptno = dept.deptno AND div.divno = dept.divno
The OpenAccess SDK SQL engine determines which join column has an index (emp.deptno or dept.deptno). If only emp.deptno has an index, emp is processed after dept. If only dept.deptno has an index, dept is processed after emp. If both have an index, the table with a unique index is processed first. If a table has no join conditions, it is processed last.