设为首页 加入收藏

TOP

oracle表压缩技术(一)
2015-11-21 01:57:02 来源: 作者: 【 】 浏览:0
Tags:oracle 压缩 技术

压缩表是我们维护管理中经常会用到的,下面我们看都oracle给我们提供了哪些压缩方式。文章摘自“Oracle? Database Administrator's Guide11g Release 2 (11.2)”。因为Hybrid Columnar Compression压缩只有在Exadata上才支持,目前用的比较少,我们会重点说一下basic和oltp两种压缩方式。

Consider Using Table Compression

As your database grows in size, consider using table compression. Compression saves disk space, reduces memory use in the database buffer cache, and can significantly speed query execution during reads. Compression has a cost in CPU overhead for data loading and DML. However, this cost might be offset by reduced I/O requirements.

##随着数据的增加,可以考虑使用表压缩技术。压缩能够节省磁盘空间,减少SGA中buffer cache的使用,显著提高查询时读数据的效率。对压缩过后的表进行数据导入和DML需要消耗更多的cpu资源,但是压缩的使用减少了I/O的开销,可以抵消掉额外的cpu开销成本(根据系统的情况,如果你的库本来cpu资源已经不足,那么这样做就不合适了)

Table compression is completely transparent to applications. It is useful in decision support systems (DSS), online transaction processing (OLTP) systems, and archival systems.

##压缩技术对应用来说完全是透明的。它对dss,oltp,archival system等系统等很有用

You can specify compression for a tablespace, a table, or a partition. If specified at the tablespace level, then all tables created in that tablespace are compressed by default.

##你可以为表空间,表或者分区指定压缩属性。如果你为表空间指定了压缩属性,那么在该表空间下建的表会默认的继承压缩属性。

Compression can occur while data is being inserted, updated, or bulk loaded into a table. Operations that permit compression include:

##压缩在insert,update和批量加载时都可能发生(具体要看你使用的是哪种压缩方式)

Single-row or array inserts and updates

The following direct-path INSERT methods:

Direct path SQL*Loader

CREATE TABLE AS SELECT statements

Parallel INSERT statements

INSERT statements with an APPEND or APPEND_VALUES hint

Oracle Database supports several methods of table compression. They are summarized in Table 20-1.

##oracle数据库支持如下几种压缩方式(注意,Hybrid Columnar Compression模式的压缩只有在Exadata上才支持)

Table 20-1 Table Compression Methods

Table Compression Method Compression Level CPU Overhead Applications Notes

Basic compression

High

Minimal

DSS

None.

OLTP compression

High

Minimal

OLTP, DSS

None.

Warehouse compression (Hybrid Columnar Compression)

Higher

Higher

DSS

The compression level and CPU overhead depend on compression level specified (LOW or HIGH).

Archive compression (Hybrid Columnar Compression)

Highest

Highest

Archiving

The compression level and CPU overhead depend on compression level specified (LOW or HIGH).


When you use basic compression, warehouse compression, or archive compression, compression only occurs when data is bulk loaded into a table.

##当你使用的是basic,warehouse或者archive压缩时,只有批量载入的数据才会被压缩(此处我觉得有点问题,应该是只有直接路径加载的数据才会被压缩。不知道官方文档这里说的批量加载是否指的就是直接路径加载)

When you use OLTP compression, compression occurs while data is being inserted, updated, or bulk loaded into a table. Operations that permit compression include:

##当你使用的是oltp压缩时,传统路径插入和直接路径插入的数据都会被压缩

Single-row or array inserts and updates##这里就是指的传统路径插入

The following direct-path INSERT methods:##这里指的是直接路径插入

Direct path SQL*Loader

CREATE TABLE AS SELECT statements

Parallel INSERT statements

INSERT statements with an APPEND or APPEND_VALUES hint

Basic compression compresses data inserted by direct path load only and supports limited data types and SQL operations. OLTP compression is intended for OLTP applications and compresses data manipulated by any SQL operation.

##Basic压缩方式仅支持有限的数据类型和sql操作,当数据使用直接路径插入时,这些数据会被压缩。OLTP压缩一般用在oltp系统上,能够压缩各种

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

评论

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