设为首页 加入收藏

TOP

oracle表压缩技术(二)
2015-11-21 01:57:02 来源: 作者: 【 】 浏览:1
Tags:oracle 压缩 技术
sql操作产生的数据

Warehouse compression and archive compression achieve the highest compression levels because they use Hybrid Columnar Compression technology. Hybrid Columnar Compression technology uses a modified form of columnar storage instead of row-major storage. This enables the database to store similar data together, which improves the effectiveness of compression algorithms. For data that is updated, Hybrid Columnar Compression uses more CPU and moves the updated rows to row format so that future updates are faster. Because of this optimization, you should use it only for data that is updated infrequently.

##因为使用了混合列模式压缩技术,Warehouse 和 archive能够提供最高的压缩等级。混合列模式压缩技术使用列模式存储代替了之前的行模式存储。列模式存储使用数据库能够把相似的数据存储在一起从而提高压缩的效率。如果混合列模式压缩的数据被更新,那么会消耗额外的cpu把被更新的行转变成行模式(行的rowid会发生变化),速度也是比较快的(不知道此处的快是跟行模式压缩相比,还是同非压缩表的update对比???)。基于混合列模式压缩的优化原理,我们应该在那些很少被update的表上使用这种压缩方式。

The higher compression levels of Hybrid Columnar Compression are achieved only with data that is direct-path inserted. Conventional inserts and updates are supported, but cause rows to be moved from columnar to row format, and reduce the compression level.

Table 20-2 lists characteristics of each table compression method.

Table 20-2 Table Compression Characteristics

Table Compression Method CREATE/ALTER TABLE Syntax Direct-Path INSERT Notes

Basic compression

COMPRESS [BASIC]

Rows are compressed with basic compression.

COMPRESS and COMPRESS BASIC are equivalent.

Rows inserted without using direct-path insert and updated rows are uncompressed.

OLTP compression

COMPRESS FOR OLTP

Rows are compressed with OLTP compression.

Rows inserted without using direct-path insert and updated rows are compressed using OLTP compression.

Warehouse compression (Hybrid Columnar Compression)

COMPRESS FOR QUERY [LOW|HIGH]

Rows are compressed with warehouse compression.

This compression method can result in high CPU overhead.

Updated rows and rows inserted without using direct-path insert are stored in row format instead of column format, and thus have a lower compression level.

Archive compression (Hybrid Columnar Compression)

COMPRESS FOR ARCHIVE [LOW|HIGH]

Rows are compressed with archive compression.

This compression method can result in high CPU overhead.

Updated rows and rows inserted without using direct-path insert are stored in row format instead of column format, and thus have a lower compression level.


You specify table compression with the COMPRESS clause of the CREATE TABLE statement. You can enable compression for an existing table by using these clauses in an ALTER TABLE statement. In this case, only data that is inserted or updated after compression is enabled is compressed. Similarly, you can disable table compression for an existing compressed table with the ALTER TABLE...NOCOMPRESS statement. In this case, all data that was already compressed remains compressed, and new data is inserted uncompressed.

##你可以在建表的时候指定compress字句,也可以在表创建后使用alter table语句改变表的压缩属性。如果是后者,那么表中已存在的数据不会被压缩,只有新插入或者update的数据有可能被压缩。同样的如果你改变一个压缩表的属性为非压缩表,表中已经存在的被压缩的数据还是保持压缩的状态,不会被解压,但新插入的数据将不会再被压缩。

The COMPRESS FOR QUERY HIGH option is the default data warehouse compression mode. It provides good compression and performance when using Hybrid Columnar Compression on Exadata storage. The COMPRESS FOR QUERY LOW option should be used in environments where load performance is critical. It loads faster than da

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 2/7/7
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇oracle游标、临时表使用练习 下一篇oracle查询优化

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: