For each block block_r in R do For each tuple s in S do For each tuple r in block_r do If r and s satisfy the join condition Then output the tuple <r,s>
嵌套循环连接, 沒有或很少條目链入本條目, 2022年7月20日, 請根据格式指引, 在其他相關條目加入本條目的內部連結, 來建構維基百科內部網絡, nested, loop, join, 是通过嵌套的循环语句把多个表连接起来的简单算法, sql中的连接操作是数据库管理中重要的一环, 算法内容, 编辑两个关系数据库表r和s通过如下的方法连接在一起, each, tuple, each, tuple, satisfy, join, condition, then, output, tuple, 这种算法将会从硬盘中读. 沒有或很少條目链入本條目 2022年7月20日 請根据格式指引 在其他相關條目加入本條目的內部連結 來建構維基百科內部網絡 嵌套循环连接 Nested loop join 是通过嵌套的循环语句把多个表连接起来的简单算法 SQL中的连接操作是数据库管理中重要的一环 算法内容 编辑两个关系数据库表R和S通过如下的方法连接在一起 For each tuple r in R do For each tuple s in S do If r and s satisfy the join condition Then output the tuple lt r s gt 这种算法将会从硬盘中读取 nr bs br 个页 br 和 bs 是R和S表所占用的页的个数 nr 是R表中的记录数 这种算法的IO次数为 O R S displaystyle O R S nbsp R displaystyle R nbsp S displaystyle S nbsp 改进方法 编辑这种算法可以通过更改循环的嵌套方式减少硬盘的访问次数到 br bs br 次 对于R表的每一页 S的每一个记录只需要被读一次 For each block block r in R do For each tuple s in S do For each tuple r in block r do If r and s satisfy the join condition Then output the tuple lt r s gt nbsp 这是一篇電腦科學小作品 你可以通过编辑或修订扩充其内容 查论编 取自 https zh wikipedia org w index php title 嵌套循环连接 amp oldid 72798000, 维基百科,wiki,书籍,书籍,图书馆,