我们对此唯一能优化的话就是避免键查找(Key lookup)操作。因此我们修改下非聚集索引,把剩下2列(OrderQty, UnitPrice),不是聚集索引键,也不是非聚集索引键,也加入非聚集索引键...
基于74个网页-相关网页
...进行一次扫描(Index Scan),这个还可以,毕竟非聚集索引都是有序进行的,但是为了进行过滤,就必须引入书签查找(Key Lookup)进行过滤,我们知道书签查找为随机IO,消耗巨大,所以这次过滤就好比在整张表中随机的去查找数据一样,其实效率还不如来一次表扫...
基于32个网页-相关网页
partial key lookup 部分键查找
You might try to clean up this code a bit by packaging the key lookup code in a named template.
您可能希望将键查找代码打包在指定模板中,使代码更加清晰。
The latter is actually a primary key lookup against the parent table and constitutes the foreign key constraint verification.
索引扫描实际上是对父表进行主键查找,并完成外键约束验证。
Compare this to Listing 1 where the result of key lookup is immediately narrowed down to the desired string by selecting s: name children.
与清单1相比,在清单1中,通过选择s: name子元素,就可以立即将查找结果限制为目标字符串。
应用推荐