oracle hcc简单测试-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3976725
  • 博文数量: 536
  • 博客积分: 10470
  • 博客等级: 上将
  • 技术积分: 4825
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-26 14:08
文章分类

全部博文(536)

文章存档

2024年(3)

2021年(1)

2019年(1)

2017年(1)

2016年(2)

2013年(2)

2012年(10)

2011年(43)

2010年(10)

2009年(17)

2008年(121)

2007年(252)

2006年(73)

相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2011-10-18 11:07:45

hybrid columnar compression [hcc] is only for exadata.

online archival compression syntax:
create table emp (
  emp_id number
, first_name varchar2(128)
, last_name varchar2(128)
) compress for archive [ low | high ];


warehouse compression syntax:
create table emp (
  emp_id number
, first_name varchar2(128)
, last_name varchar2(128)
) compress for query [ low | high ];


自己的测试:
  1. sql> create table stab(a int, b varchar2(20)) compress for query high;

  2. table created.

  3. sql> select owner,table_name,tablespace_name,compression,compress_for from all_tables where owner='gan' and table_name='stab';

  4. owner table_name tablespace_name compress compress_for
  5. ------------------------------ ------------------------------ ------------------------------ -------- ------------
  6. gan stab gants enabled query high

  7. sql> insert into stab values(1, '1111111');

  8. 1 row created.

  9. sql> c/1/2
  10.   1* insert into stab values(2, '1111111')
  11. sql> /

  12. 1 row created.

  13. sql> commit;

  14. commit complete.

  15. sql> select owner,table_name,tablespace_name,compression,compress_for from all_tables where owner='gan' and table_name='stab';

  16. owner table_name tablespace_name compress compress_for
  17. ------------------------------ ------------------------------ ------------------------------ -------- ------------
  18. gan stab gants enabled query high

  19. sql> l
  20.   1* select dbms_rowid.rowid_relative_fno(rowid) fno, dbms_rowid.rowid_block_number(rowid) blk, dbms_rowid.rowid_row_number(rowid) rnum, newtab.* from stab newtab
  21. sql> /

  22.        fno blk rnum a b
  23. ---------- ---------- ---------- ---------- --------------------
  24.          5 189 0 1 1111111
  25.          5 189 1 2 1111111
  26. sql> l
  27.   1* select dbms_rowid.rowid_relative_fno(rowid) fno, dbms_rowid.rowid_block_number(rowid) blk, dbms_rowid.rowid_row_number(rowid) rnum, newtab.* from stab newtab
  28. sql> /

  29.        fno blk rnum a b
  30. ---------- ---------- ---------- ---------- --------------------
  31.          5 189 0 1 1111111
  32.          5 189 1 2 1111111

  33. sql> alter table stab move compress for archive high;

  34. table altered.

  35. sql> select owner,table_name,tablespace_name,compression,compress_for from all_tables where owner='gan' and table_name='stab';

  36. owner table_name tablespace_name compress compress_for
  37. ------------------------------ ------------------------------ ------------------------------ -------- ------------
  38. gan stab gants enabled archive high

  39. sql> select dbms_rowid.rowid_relative_fno(rowid) fno, dbms_rowid.rowid_block_number(rowid) blk, dbms_rowid.rowid_row_number(rowid) rnum, newtab.* from stab newtab;

  40.        fno blk rnum a b
  41. ---------- ---------- ---------- ---------- --------------------
  42.          5 227 0 1 1111111
  43.          5 227 1 2 1111111


阅读(1266) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图