• [bbk5156] 第106集 第13章 表空间管理 04


    在oracle 9i版本中,表的压缩技术就已经引入.

    oracle可以做到,直接读取压缩的数据,不用解压再读取,大大提高了读写效率.

    压缩后,存储空间减少,占用的块也会减少,读取时I/O必然也会减少,自然而然地性能就提高了.关键是在读取的时候不需要解压,即可进行读取,如此更加大大提高读取的速率.

    Table Compression:Overview

    Reducing storage costs by compressing all data:

    • Basic compression for direct-path insert operations:10x
    • OLTP compression for all DML operations:2-4x
    {COMPRESS [ BASIC | FOR { OLTP } ] | NOCOMPRESS}
    Compression Method Compression Ratio CPU Overhead CREATE and ALTER TABLE Syntax Typical Applications
    Basic table compression High Minimal COMPRESS [BASIC] DSS
    OLTP table compression High Minimal COMPRESS FOR OLTP OLTP,DSS

    Compression for Direct-Path Insert Operations

    • Is enabled with CREATE TABLE ...COMPRESS BASIC ...;
    • Is recommended for bulk loading data warehouses
    • Replaces deprecated COMPRESS FOR DIRECT_LOAD_OPERATIONS
    • Maximizes contiguous free space in blocks

    压缩原理:用户在执行DML语句的时候,不是实时压缩的,而是当数据块中快满的时候,会触发一个压缩功能的触发器将现有数据进行压缩,压缩完之后会继续进行DML操作,直至块满;

    OLTP Compression for DML Operations

    • Is enabled with CREATE TABLE ... COMPRESS FOR OLTP ...;
    • Is recommended for active OLTP enviroments
    • Resplaces deprecated COMPRESS FOR ALL OPERATIONS

    Using the Compression Advisor

    The compression advisor:

    • Analyzes objects to given an estimate of space savings for different compression methods
    • Helps in deciding the correct compression level for an application.
    • Recommends various strategies for compression
      • Picks the right compression algorithm for a particular data set.
      • Sorts on a particular column for increasing the compression ratio.
      • Presents tradeoffs between different compression algorithms 
    • Works for OLTP compression(via EM);

    Using the DBMS_COMPRESSION Package

    To determine optimal compression ratios:

  • 相关阅读:
    大伯的八十岁寿辰
    收到 wincore.cpp 中一个 " ASSERT " BUG: 当 MFC 应用程序 Visual C++ 中 MFC 规则 DLL 中调用函数声明
    命名空间Microsoft.Office.Interop.Word不存在....
    中国测绘科学研究院招聘WEBGIS开发工程师与客座研究生
    开源GIS学习笔记 sinoly BLOGJAVA
    2007年7月9日星期一
    转载:使用感受: VC2005 VC6.0
    推荐:用ogr和PIL把矢量数据转化成栅格图像
    《赢在中国》感言
    VS2005的断点无效问题
  • 原文地址:https://www.cnblogs.com/arcer/p/3127414.html
Copyright © 2020-2023  润新知