国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

嵌套循環連接(Nested Loops Joins)

2024-07-21 02:50:58
字體:
來源:轉載
供稿:網友
嵌套循環連接(Nested Loops Joins)

The nested loops join, also called nested iteration, uses one join input as the outer input

table(shown as the top input in the graphical execution plan) and one as the inner (bottom)

input table.The outer loop consumes the outer input table row by row. The inner loop, executed

for each outerrow, searches for matching rows in the inner input table.In the simplest case,

the search scans anentire table or index; this is called a naive nested loops join.If the search

exploits an index, it is calledan index nested loops join.If the index is built as part of the query

plan (and destroyed upon completionof the query),it is called a temporary index nested loops join.

All these variants are considered by thequery optimizer.A nested loops join is particularly effective

if the outer input is quite small and the innerinput is PReindexed and quite large. In many small

transactions, such as those affecting only a small setof rows, index nested loops joins are far

superior to both merge joins and hash joins.In large queries,however, nested loops joins are

often not the optimal choice.【摘自technet】

嵌套循環連接,也被稱作嵌套迭代,用于連接外部輸入表(顯示為圖形執行計劃的頂部輸入)和內部輸入表的輸入

。外部循環按照行檢索外部輸入表。內部循環,執行外部的每一行,查詢內部輸入表匹配的行。最簡單的情況,查

詢掃描整個表或者索引;這叫做純嵌套循環連接。如果查詢利用了索引,被稱為索引嵌套循環連接。如果索引作為

查詢計劃的一部分被構建,這被稱作臨時索引嵌套循環連接。所有這些變體都會被查詢優化器考慮到。當外部輸入

非常小并且內部輸入很大且預先添加過索引的時候嵌套循環連接是非常有效的。在許多小的轉換中,比如僅僅影響

很小的行集的情況。索引嵌套連接是遠遠優于合并連接和哈希連接的。然而,在大數據的查詢情況下,嵌套循環連

接通常不是最好的選擇。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 郓城县| 九龙坡区| 岗巴县| 浦县| 淮阳县| 松潘县| 贺州市| 沁水县| 和硕县| 留坝县| 遂平县| 宽甸| 宝丰县| 庆城县| 通州市| 彭山县| 临朐县| 荔浦县| 安塞县| 保定市| 如皋市| 滨海县| 招远市| 合作市| 南雄市| 高要市| 扎鲁特旗| 航空| 博罗县| 贵阳市| 台安县| 雅安市| 遂平县| 德格县| 贡山| 深州市| 四子王旗| 浮梁县| 印江| 商城县| 临颍县|