为什么聚簇表的空间扩得这么厉害?

    问题从ITPub.net而来:

    我两张表, 分别各600m数据, 有相同得PK,每张表表只有两个字段, 然后建立聚簇, 这个居然有4G多了? 晕!

    当然晕的肯定是你了, 不是Oracle, 这个问题, 我的第一反应是你没有指定SIZE参数, 先来看一段说明吧.

    SIZE

    specifies the amount of space in bytes to store all rows with the same cluster key value or the same hash value. You can use K or M to specify this space in kilobytes or megabytes. The value of this parameter cannot exceed the size of a data block. If you omit this parameter, Oracle reserves one data block for each cluster key value or hash value.

    因此可以推算, 你的表大约有50万个不同的cluster key值, 假定你的块大小是8k. 不知道我猜的对不对?

发表留言:

« Previous | Main | Next »

英语900句 | English 900

  • What will you do this weekend?
  • 这周末你将干什么?
  • I'll go to a concert.
  • 我要去听音乐会.
  • I'll go on an outing with some friends.
  • 我与朋友去郊游.
  • Do you like traveling?
  • 你喜欢郊游吗?
  • Yes, I like it a great deal/it very much.
  • 是的, 我很喜欢.