zoukankan      html  css  js  c++  java
  • [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:

  • 相关阅读:
    PHP面向对象魔术方法基本了解
    PHP面向对象访问修饰符的基本了解
    php析构函数小结
    php构造方法(函数)基础
    php面向对象成员方法(函数)练习
    php面向对象的初认识
    用JS把数组内的日期转换为星期
    JavaScript事件(随笔)
    Spring框架的核心功能之AOP技术
    Spring框架 IOC注解
  • 原文地址:https://www.cnblogs.com/arcer/p/3127414.html
Copyright © 2011-2022 走看看