Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (Français) » SQL Anywhere Server - SQL Usage » Query optimization and execution » Query execution algorithms » Types of algorithms » Join algorithms


NestedLoopsSemijoin algorithm (JNLS)

Similar to NestedLoopsJoin, NestedLoopsSemijoin joins its inputs by scanning the right-hand side for each row of the left-hand side. As with NestedLoopsJoin, the right-hand side may be read many times, so for larger inputs an index scan is preferable.

NestedLoopsSemijoin differs from NestedLoopsJoin in two respects. First, NestedLoopsSemijoin only outputs values from the left-hand side; the right-hand side is used only for restricting which rows of the left-hand side appear in the result. Second, NestedLoopsSemijoin stops each search of the right-hand side when the first match is encountered. NestedLoopsSemijoin can be used when inputs to the join include table expressions from an existentially-quantified (IN, SOME, ANY, EXISTS) nested query that has been rewritten as a join.