Key Lookup和RID Lookup之间有什么区别? [英] What is diff between Key Lookup and RID Lookup?

查看:976
本文介绍了Key Lookup和RID Lookup之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我有几个quries

Hi friends,

I have few quries

1. Key Lookup happens with non-cluster index seek?<br />
2. RID Lookup happens with HEAP?<br />
3. How it can optimise sql query?





提前感谢



thanks in advance

推荐答案

1。在表中查询NonClustered Column时会发生Key Lookup。首先,使用列查询的数据进行搜索时会发生索引查找。它将结果作为主键索引。它将主键传递给Key查找以快速检索数据以获取查询的列。



2.主要发生在没有任何过滤条件的查询中。 RID Lookup是使用提供的行标识符(RID)在堆上进行书签查找。它主要与嵌套查找相关联。



3.我没有得到它?请清楚解释!!!
1. Key Lookup happens when you are querying NonClustered Column in the table. First, Index seek will happen for searching with data you queried with column. It will gives result as a Primary key Indexed. It passes Primary key to Key lookup to retrive data as fast to get the queried columns.

2. It mostly happens with queries who doesn't have any conditions to filter. RID Lookup is a bookmark lookup on a heap using a supplied row identifier (RID). It mostly associate with nested lookups.

3. I didn't got it ? Please explain it clearly !!!


这篇关于Key Lookup和RID Lookup之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆