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:

  • 相关阅读:
    Codeforces Round #297 (Div. 2) 525C Ilya and Sticks(脑洞)
    全栈必备 JavaScript基础
    2014-04-19编程之美初赛题目及答案解析
    doT js模板入门 2
    一篇关于arc下内存管理的老文章,包含各种冷门修饰符(关于内存),写的较好,mark
    MyBatis官方教程及源代码解析——mapper映射文件
    Android中图片的三级缓存策略
    python字符串/元组/列表/字典互转
    关于字节对齐的理解
    阿里云服务器ecs配置之安装redis服务
  • 原文地址:https://www.cnblogs.com/arcer/p/3127414.html
Copyright © 2011-2022 走看看