skip to main content
Designing and coding the IP : Join processing : Implementing Block Join processing : Disabling block joins
 

Disabling block joins

The OpenAccess SDK SQL engine checks for the search expression patterns described in this section, and disables block join execution mode. If the query is found to match one of these cases, the join query is implemented in the standard join query mode where an inner table is queried for each outer table row.

Case 1: The join condition is not equal join

If for any reason the join condition is not t1.c1 = t2.c2, block joins are disabled.
emp.deptno > dept.deptno
emp.deptno = dept.deptno+1

Case 2: The join condition is combined with a UNION expression

emp.deptno = dept.deptno OR sal > 1000

Case 3: The inner table has multiple subqueries

Assume Table A has index on empno and sal fields:
SELECT ., FROM dept, emp WHERE (emp.empno > 5 AND emp.deptno = dept.deptno) OR (emp.sal > 1000 AND emp.deptno = dept.deptno)
The query on table emp is split as two subqueries:
(emp.empno > 5 AND emp.deptno = dept.deptno)
(emp.sal > 1000 AND emp.deptno = dept.deptno)
In this case, when the results of Inner table emp are queried, both subqueries are processed before joined rows for the block subset of Table dept can be built.
What if both subqueries have different join conditions?
(emp.empno > 5 AND emp.deptno = dept.deptno) OR (sal > 10000)