有没有兄弟在生产环境下用过table compression(压缩表)? 效果怎么样?

[复制链接]
查看11 | 回复9 | 2012-6-2 02:10:00 | 显示全部楼层 |阅读模式
本帖最后由 kelsoncong 于 2012-3-21 10:53 编辑
刚刚在看Oracle Database 11g: BI and Data Warehousing的文档,对其中table compression的表述非常感兴趣,按照Oracle的说法,压缩表技术可以极大的减少存储空间,与此同时,不降低INSERT/UPDATE的性能,查询性能反而可以得到提高。之所以可以这样,是因为Oracle可以直接操作压缩数据。下面是Oracle的原文的描述:It is important to mention that table compression enhancements introduced in Oracle Database 11g are not just incremental changes. An enormous amount of work has gone into making sure that the new compression technology has negligible impact on updates because any noticeable write-time penalty due to compression will not be acceptable in an OLTP environment. As a result, compression technology in Oracle Database 11g is very efficient and could reduce the space consumption by 50–75%. And while you do that, not only your write performance does not degrade, but also your read performance or queries improve. This is because unlike desktop-based compression techniques where you have to wait for data to be uncompressed, Oracle technology reads the compressed data (less fetches needed) directly and does not require any uncompress operation.
这个是原理图:


compression table.JPG (49.92 KB, 下载次数: 17)
下载附件
compression table
2012-3-21 10:47 上传

我对这个说法有一点疑问,如果Oracle所说全部属实,那Compress table应该可以慢慢取代传统的Heap Table了,尤其在数据仓库环境下,数据文件非常大,且应用类型主要为一次装载,多次查询,这个优点会体现的更加明显。因此想咨询一下版上的各位兄弟,有人在生产环境下使用过compress table吗? 感觉如何? 有没有什么缺陷? 谢谢大家! 也欢迎大家积极讨论

回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
还成,一般的basic,oltp的都差不多能压到2-6倍,性能没啥感觉,需要测试下。
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
sheep_yang678 发表于 2012-3-21 10:58
还成,一般的basic,oltp的都差不多能压到2-6倍,性能没啥感觉,需要测试下。

谢谢回复,我决定去找一个不重要的数据仓库试验下,看看性能是否有提升,不过只要没有太大的硬伤,这个功能还是蛮值得一试的,毕竟优点非常的突出
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
表数据压缩是把表中重复数据进行压缩成一行数据,在数据行位置留下一个指针。
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
我在 EXADATA V2 上 搞过 COMPRESS FOR QUERY HIGH,性能提升非常非常 明显。
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
我在 EXADATA V2 上 搞过 COMPRESS FOR QUERY HIGH,性能提升非常非常 明显。
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
lbs1988 发表于 2012-3-21 13:50
我在 EXADATA V2 上 搞过 COMPRESS FOR QUERY HIGH,性能提升非常非常 明显。

呵呵,好极了,那真是值得一试啊...
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
楼主试验以后记得进来通报一下情况


回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
kelsoncong 发表于 2012-3-21 14:06
呵呵,好极了,那真是值得一试啊...

这个你得自己测试,他的及时是exadata,混合列压缩是很强力,但是普通机器不能用的。你只有3个选择:BASIC,OLTP,不用压缩。
回复

使用道具 举报

千问 | 2012-6-2 02:10:00 | 显示全部楼层
Query PerformanceIn the previous section we see that compressed table (or partition, subpartition,index) segmentsrequire less space on disk. One may infer that this will improve query performance. It’s true. Let’s see how
hsensoy@dds> select count(*) from big_table_nocomp;
Elapsed: 00:00:28.99
hsensoy@dds> select count(*) from big_table_comp;
Elapsed: 00:00:11.75
hsensoy@dds> select count(*) from big_table_careful_comp;
Elapsed: 00:00:06.18
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行