兄弟姐妹们,此话怎解?

tektite 2008-08-30 05:58:02
When a nonclustered index is used to retrieve the data rows from a heap table with a clustered index,……

heap table 不是指没有聚集索引的表吗?此句话应怎理解?
...全文
123 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
dobear_0922 2008-09-01
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 tektite 的回复:]
引用 9 楼 mengmou 的回复:
我猜是印刷错误,a heap table without a clustered index




Yeah! I think so, this is a typo.
[/Quote]

So do I.
tektite 2008-08-31
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 mengmou 的回复:]
我猜是印刷错误,a heap table without a clustered index


[/Quote]

Yeah! I think so, this is a typo.
mengmou 2008-08-30
  • 打赏
  • 举报
回复
我猜是印刷错误,a heap table without a clustered index

CN_SQL 2008-08-30
  • 打赏
  • 举报
回复
不用咬文嚼字了吧,你可以理解为这里的堆表就是说表的意思。
tektite 2008-08-30
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 qianjin036a 的回复:]
"当你从一个带有聚集索引的堆表中以非聚集索引来检索行数据时..."
[/Quote]

是的,按字面上去译是这样的。
但我的疑问是,既然堆是不含聚集索引的表,哪何来聚集索引呢?
-狙击手- 2008-08-30
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 qianjin036a 的回复:]
"当你从一个带有聚集索引的堆表中以非聚集索引来检索行数据时..."
[/Quote]
-晴天 2008-08-30
  • 打赏
  • 举报
回复
"当你从一个带有聚集索引的堆表中以非聚集索引来检索行数据时..."
tektite 2008-08-30
  • 打赏
  • 举报
回复
我不理解的是这部分:When a nonclustered index is used to retrieve the data rows from a heap table with a clustered index

堆是不含聚集索引的表。那为什么上面这段话中提到在检索堆中的数据行时用到聚集索引呢?
CN_SQL 2008-08-30
  • 打赏
  • 举报
回复
直接翻译不好翻译,我告诉你含义吧:

因为2000和2005的不同,以及非聚集索引的内部结构,因此当你扫描非聚集索引以获取数据时(表上是拥有聚集索引的),你会看到2005的执行计划中,有个RID的操作(这个在2000里是BOOKMARK的操作),这个RID就是非聚集索引内部结构的一部分.

推荐你去看看数据库技术内幕---存储引擎 一书.
tektite 2008-08-30
  • 打赏
  • 举报
回复
原文整段是这样的:

When a nonclustered index is used to retrieve the data rows from a heap table with a
clustered index, you see a query plan similar to the one shown in Figure 30.2. Notice that
in SQL Server 2005, the bookmark lookup operator is replaced by a RID lookup, essentially
as a join with the RIDs returned by the nonclustered index seek.
CN_SQL 2008-08-30
  • 打赏
  • 举报
回复
下文呢?
HEAP TABLE是堆表,没有索引的表,称为堆表

34,576

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧