表压缩的用法(技术交流)

我现在有个表,已经500G了,现在想要启用压缩,让这个表缩小下空间?alter table 。。 compress这个操作可行吗?以下几个问题1:对于新插入的数据,是压缩的吗?insert方式增加、load方式增加都会压缩吗?2:对于历史数据能压缩吗?难道做下reorg就可以吗?3:能在线做吗?需要表空间有剩余500g吗?...显示全部
我现在有个表,已经500G了,现在想要启用压缩,让这个表缩小下空间?
alter table 。。 compress这个操作可行吗?以下几个问题
1:对于新插入的数据,是压缩的吗?insert方式增加、load方式增加都会压缩吗?
2:对于历史数据能压缩吗?难道做下reorg就可以吗?
3:能在线做吗?需要表空间有剩余500g吗?收起
参与11

查看其它 9 个回答drdb2的回答

drdb2drdb2系统工程师se
回复 7# wangzk0206

http://www-01.ibm.com/support/kn ... c/doc/c0052331.html
"
Table-level compression dictionary creation

Table-level compression dictionaries for tables that you enable for adaptive or classic row compression can be built automatically or manually. Tables that you enable for adaptive compression include page-level data dictionaries, which are always automatically created.

    Automatic dictionary creation
Starting with DB2® Version 9.5, a table-level compression dictionary is created automatically if each of the following conditions is met:

    You set the COMPRESS attribute for the table by using the CREATE TABLE or ALTER TABLE statement with the COMPRESS YES ADAPTIVE or COMPRESS YES STATIC clause.
    A table-level compression dictionary does not already exist for the table.
    The table contains sufficient data for constructing a dictionary of repeated data.
互联网服务 · 2015-03-17
浏览1311

回答者

drdb2
系统工程师se

drdb2 最近回答过的问题

回答状态

  • 发布时间:2015-03-17
  • 关注会员:1 人
  • 回答浏览:1311
  • X社区推广