求助关于cluster index的理解

[复制链接]
查看11 | 回复5 | 2005-10-27 20:45:16 | 显示全部楼层 |阅读模式
Although a normal index does not store null key values, cluster indexes store null keys. There is only one entry for each key value in the cluster index. Therefore, a cluster index is likely to be smaller than a normal index on the same set of key values.
Although a normal index does not store null key values, cluster indexes store null keys.
虽然普通的索引不保存空的键值,但cluster index保存空的keys?
为什么cluster index保存空的keys?什么情况呢,搞不明白
请指教
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
cluster在 存储中,是多个表集合在一起存储的,也就是说 多个表的数据 存储在同一个 block 中。 如果多个表中同时存在 nullkey,是不是也需要把这些集中起来放在一起? 你去观察一下?
想到底是放 null key 呢还是不放 nullkey 好呢? 根据 cluster的特点,结合起来考虑考虑看看。

其实,普通 b-tree index 也不是说就不能放 nullkeys ,只不过可能oracle认为大多数查询是 等值 或者 范围查询,很少 用 isnull 查询,并且如果表中存在大量的 null 的时候不存储 null 有利于减小索引大小提高性能。在各种因素权衡下 选择了不存储 null 。
如果你实在觉得没有很明显的理由,大不了就先记下好了。
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
记下了,非常感谢
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
biti_rainy不愧是大师,回答很好
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
回答的很好,佩服。
关于cluster的存储,是不是说,2个表可以共享某些字段的值进行存储?
我想这样做的话,那么对于这2个表的这些共享存储字段进行的表连接操作肯定会变快的,不知道这样理解是否正确?
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
Each cluster key value is stored only once for all the rows of the same key value; it therefore uses less storage space.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行