【翻譯自mos文章】oracle資料庫中 基本的表壓縮和進階壓縮之間的區別,mosoracle

來源:互聯網
上載者:User

【翻譯自mos文章】oracle資料庫中 基本的表壓縮和進階壓縮之間的區別,mosoracle
基本的表壓縮和進階壓縮之間的區別,
摘錄自mos文章Difference Between Basic Table Compression And Advanced Compression (Doc ID 1548187.1)

適用於:
Oracle Database - Enterprise Edition - Version 10.2.0.5 and later
Information in this document applies to any platform.

目標:
What is the difference between Basic Table Compression in 10g and Advanced Table Compression in 11gR2?

方法:
user_tables 或者dba_tables視圖中的COMPRESS_FOR列,在11.2和 11.1版本中,返回的值是不同的。
在11.2中,該列的返回值是 BASIC or OLTP
在11.1中,該列的返回值是  DIRECT LOAD ONLY and FOR ALL OPERATIONS

使用alter table...move...compress, alter index...rebuild...compress 命令,此時是使用的基本的壓縮,除非使用進階壓縮的授權。

基本的壓縮是在block層級工作,將資料區塊上的重複的bit資訊 挪動(remove)到block header中,
並每個block上儲存這些資訊一次。請注意,並不是block上出現一次就儲存一次。這樣的機制允許在一個block之記憶體儲2倍,3倍,4倍甚至更多的資料。

基本的壓縮僅僅在如下情況下才有效:
direct path operations--比如 insert /*+APPEND*/, alter table t move, create table as select, sqlldr direct=y
基本的壓縮並不阻止你使用正常的nsert/update/delete語句。----這就是說:這些dml語句會產生(result in)一些非壓縮資料。
一個表中可以存在壓縮的blocks和沒壓縮的blocks--這是能正常工作的。
There are restrictions as to what you can do with a basic compressed table as far as dropping columns and the like.

在Oracle 11gR1 以及更新(above )版本中,有了 advanced compression option。
這個option允許 normal, conventional path operations 這些操作被壓縮。
因此,一個application可以在不使用direct path operations的情況下,以壓縮的格式儲存資料。

Restrictions on Table Compression Table compression is subject to the following restrictions:


COMPRESS FOR OLTP and COMPRESS BASIC are not supported for tables with more than 255 columns.
As "COMPRESS FOR OLTP" is part of Advanced compression, the restriction holds good for it as well.

You need separate license to use 11g Advanced Compression.

For more information on Advanced Compression, see the OTN site.







相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.