zoukankan      html  css  js  c++  java
  • Data Compression(1)

    Supported

    ü  SQL SERVER 2008,2012 Enterprise, Developer Edition

    Notice :Backup compression is different of Data Compression. Backup compression was introduced in SQL Server 2008 Enterprise. Beginning in SQL Server 2008 R2, backup compression is supported by SQL Server 2008 R2 Standard and all higher editions. At installation, the default behavior is no backup compression. But this default can be changed by setting the backup compression default server configuration option.(USE master; GO EXEC sp_configure ‘backup compression default’, '1'; RECONFIGURE WITH OVERRIDE;)

    Advantage

    ü  Better use of the IO( because one page can contain more data ,the same amount of data required less page )

    ü  Better use of the Memory(because buffer can cache more data)

    ü  Reduce page latch(because one page can contain more data)

    Disadvantage

    ü   Cost more CPU(compression and decompression data will need cpu to work )

    can be applied to following objects

    ü  A whole table that is stored as a heap

    ü  A whole table that is stored as a clustered index

    ü  A whole nonclustered index

    ü  A whole indexed view

    ü  Partition table and index,any partitions can use different compression setting

    Compression type

    ü   Row Compression

    ü   Page Compression

    Application

    ü  On table

    ü  On index

    ü  On Partition Table/View

    When partition has some change, the compression setting will be applied as follows

      • Dividing partition :  Both partition will inherit the original partition Settings
      • Merging partition : Merge partitions inheritance destination partition Settings
      • Switching partition: The compression settings of original partition and destination partition must be matched.
      • Drop partition clustered index : Table keep compression Settings
      • Estimate space saved

    ü  Sp_estimate_data_compression_savings

    ü  Data compression wizard

    Monitor data compression

    ü  Instance level

      • Performance Monitor->SQL Server:Access Method
      • Page compression attempts/sec
      • Page compressed/sec

    ü  Database object Level

      • Sys.dm_db_index_operational_stats
      • Sys.dm_db_index_physical_stats

    considerations

    • Compression is not available for system tables.
    • Compression is not available for sparse columns.
    • Because of their size, large-value data types are sometimes stored separately from the normal row data on special pages. Data compression is not available for the data that is stored separately.
    • Changing the compression setting of a heap requires all nonclustered indexes on the table to be rebuilt so that they have pointers to the new row locations in the heap.
    • When you are compressing indexes, leaf-level page can be compressed with both row and page compression .Non-leaf-level pages do not receive page compression.
    • When delete the clustered index, the table’s data compression setting will be unchanged. When a clustered index is create on a heap, the clustered index inherits the compression state of the heap unless an alternative compression state is specified.
    • Nonclustered indexes don’t inherit the table compression setting.
    • You can enable or disable row or page compression online or offline. Enabling compression on a heap is single threaded for an online operation.
    • New pages allocated in a heap as part of DML operations will not use page compression until the heap is rebuilt.
    • The disk space requirements for enabling or disabling row or page compression are the same as for creating or rebuilding an index. For partitioned data, you can reduce the space that is required by enabling or disabling compression for one partition at a time.
  • 相关阅读:
    vue踩坑-This relative module was not found
    基于promise用于浏览器和node.js的http客户端的axios
    祈澈菇凉的高端知识资源分享星球开通
    编程微刊第八期文章汇总(2018.8)
    2018上半年GitHub上最热门的开源项目
    【福利】小程序开发资源干货汇总
    web开发快速提高工作效率的一些资源
    【福利】微信小程序130个精选Demo合集
    祈澈菇凉的高端知识资源分享星球开通
    基于promise用于浏览器和node.js的http客户端的axios
  • 原文地址:https://www.cnblogs.com/shihuai355/p/3807914.html
Copyright © 2011-2022 走看看