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

SQL Anywhere 12.0.0 (中文) » SQL Anywhere 服务器 - SQL 的用法 » 查询优化与执行 » 查询执行算法 » 算法类型 » 连接算法

 

NestedLoopsSemijoin 算法 (JNLS)

与 NestedLoopsJoin 类似,NestedLoopsSemijoin 通过为左侧的每行扫描右侧的内容来连接其输入。由于使用了 NestedLoopsJoin,可能会多次读取右侧,因此对于较大的输入,最好进行索引扫描。

NestedLoopsSemijoin 与 NestedLoopsJoin 在两方面有所不同。第一,NestedLoopsSemijoin 只输出左侧的值;右侧只用来限制左侧的哪些行将显示在结果中。第二,在遇到第一个匹配项后,NestedLoopsSemijoin 将停止右侧的每个搜索。当连接的输入包括来自已被重写为连接的存在限定(IN、SOME、ANY、EXISTS)嵌套查询的表表达式时,可以使用 NestedLoopsSemijoin。