2、oltp 方式压缩的表,支持删除表中的列,但是Oracle内部是把删除的列用unused方式来处理的,从而避免大量的解压缩与压缩操作,不过这导致了不能释放该列占有的存储空间。
SQL> alter table employees move compress for oltp;
Table altered.
SQL> alter table employees drop column salary;
Table altered.
SQL> select * from user_unused_col_tabs
2 where table_name = 'EMPLOYEES';
TABLE_NAME COUNT
------------ ----------
EMPLOYEES 1
3、如果你不指定使用basic compression 方式压缩的表的pct_free 参数将会被自动的设置为0。
4、压缩理论上将会增加CPU的负载,但是实际的情况可能不是这样的,因为CPU处理的I/O 操作减少了。如果I/O 操作不能抵消CPU负载的提高,确保你的系统中有足够CPU资源。
5、压缩表不能超过255个列。
6、压缩表不支持在线段压缩。
7、可以往basic compression 方式的压缩表中添加列,但是不能指定默认值。
SQL> alter table employees move compress basic;
Table altered.
SQL> alter table employees add (salary number(7) default 0);
alter table employees add (salary number(7) default 0)
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SQL> alter table employees add (salary number(7));
Table altered.
8、可以往oltp compression 方式的压缩表中添加列,如果指定默认值,该列必须是not null 约束的。
SQL> alter table employees add (income number(7) default 0);
alter table employees add (income number(7) default 0)
*
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables
SQL> alter table employees add (income number(7) default 0 not null);
Table altered.
9、这里所说的表的压缩方式,不适合与LOBs
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
