zoukankan      html  css  js  c++  java
  • 053-105

    Which statements are true regarding table compression? (Choose all that apply.)
    A. It saves disk space and reduces memory usage.
    B. It saves disk space but has no effect on memory usage.
    C. It incurs extra CPU overhead during DML as well as direct loading operations.
    D. It incurs extra CPU overhead during DML but not direct loading operations.
    E. It requires uncompress operation during I/O.

    此题考点是表压缩。 D 是迷惑选项,解压的时候不是在 I/O 读取的时候,而是在内存中处理数据的时候,会消耗更多的 CPU
    压缩节省磁盘空间,减少数据库在 buffer cach 中的内存使用,并且明显的加快在读的速度。
    压缩会导致在数据加载和 DML 时消耗更多的 CPU.
    压缩可以发生在插入,更新,批量装载到表时。
    允许压缩的操作包括:
    1.单行或数组插入或更新
    2.直接路径 insert 方式,包括 SQL*loader 的直接路径加载,CTAS 语句,并行 INSERT 语句,包含 APPEND或 APPEND_VALUES hint 的插入语句。
    在 创 建 表 的 时 候 可 以 使 用 COMPRESS FOR 选 项 选 择 压 缩 模 式 , 可 以 有 的 压 缩 模 式 忽 略 , 默 [BASIC],OLTP,QUERY[LOW|high],archive[low|high],例如:
    CREATE TABLE orders ... COMPRESS FOR OLTP;
    查询表是否被压缩:
    SELECT table_name, compression, compress_for FROM user_tables;
    SELECT table_name, partition_name, compression, compress_for
    FROM user_tab_partitions;
    表压缩的限制:
    在线段收缩不支持被压缩的表
    表压缩不会应用在安全 LOBs 中,安全 LOB 有自己的压缩方式
    以 BASIC 压缩方式创建的表,PCT_FREE 参数自动设置为 0,除非你手动指定
    当不再想使用表压缩时,可以使用 ALTER TABLE...NOCOMPRESS 修改表的数据,但是之前插入已压缩的数据无法修改。之后插入的语句不会再被压缩。

  • 相关阅读:
    Git学习笔记(一)
    sql复制表结构及复制表数据
    C#连接Oracle数据库查询数据
    ExcelHelper.cs
    MongoHelper.cs
    Accesshelper.cs
    Android_布局属性大全
    [WinForm]Dundas Chart控件学习(附源码)
    [Android]Adb connection Error:远程主机强迫关闭了一个现有的连接
    html to openxml
  • 原文地址:https://www.cnblogs.com/Babylon/p/7845286.html
Copyright © 2011-2022 走看看