oracle basic compress
来源:互联网 发布:nginx 缓存静态文件 编辑:程序博客网 时间:2024/05/21 10:51
验证:basic compress 方式下,Rows inserted without using direct-path insert and updated rows are uncompressed.
1、创建表
----- append 方式插入
SQL> create table t compress basic tablespace test as select * From emp where 0=1;
表已创建。
----普通方式插入数据
SQL> create table t1 compress basic tablespace test as select * From emp where 0=1;
----用于插入append 插入
SQL> create table t2 tablespace test as select * From emp where 0=1;
-----普通方式插入数据
SQL> create table t3 tablespace test as select * From emp where 0=1;
COUNT(*)
----------
196608
2、插入数据
SQL> insert /*+ append */into t select * From test;
已创建196608行。
SQL> commit;
提交完成。
SQL> insert into t1 select * From test;
已创建196608行。
SQL> commit;
提交完成。
SQL> insert /*+ append */into t2 select * From test;
已创建196608行。
SQL> commit;
提交完成。
SQL> insert into t3 select * From test;
已创建196608行。
SQL> commit;
提交完成。
SQL> analyze table t compute statistics;
表已分析。
SQL> analyze table t1 compute statistics;
表已分析。
SQL> analyze table t2 compute statistics;
表已分析。
SQL> analyze table t3 compute statistics;
表已分析。
3、对比:
SQL> select table_name,blocks,compress_for From dba_tables where table_name in ('T','T1','T2','T3');TABLE_NAME BLOCKS COMPRESS_FOR
------------------------------ ---------- ------------
T 301 BASIC
T1 1126 BASIC
T2 1193
T3 1252
结论:使用append方式插入数据压缩效果比较好,虽然表是basic compress,如果是普通插入方式,那么基本和不压缩效果是一样的;
3、更新:
SQL> update t set sal=sal+1;
SQL> update t1 set sal=sal+1;
SQL> update t2 set sal=sal+1;
SQL> update t3 set sal=sal+1;
commit;对四个表进行分析:
analyze table t compute statistics;
analyze table t1 compute statistics;
analyze table t2 compute statistics;
analyze table t3 compute statistics;
SQL> select table_name,blocks,compress_for From dba_tables where table_name in ('T','T1','T2','T3');
TABLE_NAME BLOCKS COMPRESS_FOR
------------------------------ ---------- ------------
T 1644 BASIC
T1 1126 BASIC
T2 1193
T3 1252
结论:basic 压缩方式的表,不适合做更新,否则占用空间会更大
0 0
- oracle basic compress
- sql and oracle compress
- ORACLE TABLE COMPRESS 测试
- compress
- compress
- compress
- oracle basic
- Oracle 10gR2压缩(Compress)技术
- Oracle 11g 数据泵 PK / compress /impdp/
- 使用split、compress分割压缩oracle的exp文件
- oracle数据库备份EXP的compress=Y参数
- Database-basic knowledge(Oracle)
- Oracle basic alternation
- oracle basic sql
- compress algorithm
- openlayers compress
- png compress
- redis compress
- C#中的枚举类型,原来有这么多用法
- Zynq Ubuntu下开发(3)
- 切片数据下载
- void及void指针含义的深刻解析
- Counting bobs
- oracle basic compress
- Object -C 2.0基础语法
- Ruby on Rails 时间加上N天
- 求n个数中第k大的数、前K大的数、快速排序
- NGUI 鼠标停留UI上时缓慢显示子Item,当无停留超过一定时间后回到原地
- AJax和comet
- Java HashMap的工作原理
- android-Activity操作Data文件
- tabbar 按钮形状自定义显示问题