ITPub博客

首页 > 应用开发 > IT综合 > Table Compression (160)

Table Compression (160)

原创 IT综合 作者:tsinglee 时间:2007-11-08 10:38:03 0 删除 编辑

Oracle's table compression feature compresses data by eliminating duplicate values in
a database block. Compressed data stored in a database block (also known as disk
page) is self-contained. That is, all the information needed to re-create the
uncompressed data in a block is available within that block. Duplicate values in all the
rows and columns in a block are stored once at the beginning of the block, in what is
called a symbol table for that block. All occurrences of such values are replaced with a
short reference to the symbol table.

With the exception of a symbol table at the beginning, compressed database blocks
look very much like regular database blocks. All database features and functions that
work on regular database blocks also work on compressed database blocks.

Database objects that can be compressed include tables and materialized views. For
partitioned tables, you can choose to compress some or all partitions. Compression
attributes can be declared for a tablespace, a table, or a partition of a table. If declared
at the tablespace level, then all tables created in that tablespace are compressed by
default. You can alter the compression attribute for a table (or a partition or
tablespace), and the change only applies to new data going into that table. As a result,
a single table or partition may contain some compressed blocks and some regular
blocks. This guarantees that data size will not increase as a result of compression; in
cases where compression could increase the size of a block, it is not applied to that
block.

表压缩
1. 表压缩可以消除数据块中重复的键值 . 数据块内的每个重复值被存储在在块头的符号表内 .
2. 可以被压缩的数据库对象有表和物化视图 . 对于分区表 , 用户可以选择压缩部分或全部分区 . 表空间 , 表 , 及分区表都可以被设定为压缩模式.
如果在表空间级作了设定 , 那么在此表空间内创建的表默认都以压缩模式存储.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-981250/,如需转载,请注明出处,否则将追究法律责任。

上一篇: Column Order (159)
请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1898050