segment compression的一点测试与说明

11g 的segment compression在内部存储上几乎没有变化..

对于新的compression for OLTP 新增了下面图中所示的相关处理, 也就是当block 达到一定的full程度的时候会触发一次compress动作,
将使用的空间降下来, 过一段时间, 由于dml操作的原因, block会再度达到指定的full 程度, 又会再一次触发compress动作.. 具体到什么时候
不会触发compress或者到什么程度触发compress我还不清楚..

图片来自Oracle的白皮书.(见附件, page 6).

关于Oracle9i–11g的compression 功能 ( 特别推荐 )
下面这两篇文章对Oracle Segment Compression介绍的非常深入, 有兴趣的同学可以深入看看.
http://www.laoxiong.net/dissect_compressed_block_part1.html
http://www.laoxiong.net/dissect_compressed_block_part.html

附件的DataSegmentCompression.ppt为JulianDyke的文档(具体实现介绍见page 32-36). (这一段介绍可以与上面老熊的文章部分吻合, 应该可以促进部分了解..)

另外还有部分关于row data/column data的相关介绍.. 可以参考DSI 402e Data Types and Block Structures(pages 96, 103-106)

另外还有几篇可参考文件
Oracle的sement compression白皮书(见附件)

冯春培最早在cnoug上发的帖子(在itpub也贴了),, 还有汪海对这个帖子的深度跟帖..
http://www.cnoug.org/viewthread.php?tid=3553

汪海早年关于这个问题的帖子.
http://wzwanghai.spaces.live.com/blog/cns!56626E237AFBD116!206.entry
http://www.orawh.com/78.html

eygle的介绍文章, 可看可不看, 深度理解看最上面的帖子, 使用介绍看杨保秋的blog.
http://www.eygle.com/archives/2006/06/oracle9ir2_nf_table_compress.html

黄玮 blog, 工作于OCCL 东方海外, 这篇介绍的也不错,,
http://www.hellodba.com/Doc/data_compress.htm

杨保秋的blog, 含有相关使用说明,介绍,场景使用
http://space.itpub.net/9134/viewspace-179724
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179725
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179730
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179731
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179737
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179739
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179744
http://space.itpub.net/?uid-9134-action-viewspace-itemid-179745

表压缩的原理
http://www.oratea.cn/2008/03/31/54.html
压缩表的原理(续1)
http://www.oratea.cn/2008/05/23/116.html
压缩表的原理(续2)
http://www.oratea.cn/2008/05/30/122.html

后面是我自己针对这个的一个测试结果.

delayed segment creation功能(11gr2新特性).

—-对于普通表以及其上的索引/lob segment/lob index等对象的segment,,在表中没有记录的时候,

—-segment 是先不创建的. 只有等到这个表中产生真实的记录的时候, 才会真正生成对应的segment. (见test 1).

但是要注意,,

上有1条记录,,哪怕是不涉及到对应的索引/lob项, segment也会创建..(见test 2).
分区表只要创建就会生成对应的segment, 也就是对于分区表, Oracle不支持这个特性 (见test 3, 附相关文档说明).

Restrictions on Deferred Segment Creation This clause is subject to the following restrictions:

You cannot defer segment creation for the following types of tables: partitioned tables, index-organized tables, clustered tables, global temporary tables, session-specific temporary tables, internal tables, typed tables, AQ tables, [...]

Oracle 11g Adaptive direct path read的几篇链接.

11g and direct path reads
http://oracledoug.com/serendipity/index.php?/archives/1321-11g-and-direct-path-reads.html
一篇关于Adaptive direct path reads的基本介绍.

http://afatkulin.blogspot.com/2009/01/11g-adaptive-direct-path-reads-what-is.html

11G’s ability to do direct path reads during full table scans without utilizing PQ was covered in a number of places already (see this post by Doug Burns for example).

When direct path reads starts to happen?

It is known that somewhat reliable figure is your _small_table_threshold multiplied by 5 [...]