SlideShare una empresa de Scribd logo
1 de 31
Vinod Kumar M
Technology Evangelist – DB and BI
Microsoft Corporation
www.ExtremeExperts.com
Session Objectives And Takeaways
 Session Objectives
   Why data compression?
   Describe data compression in SQL Server
   Describe Space/Performance trade-offs
 Key Takeaways
   Can reduce size of a database significantly
   Easy to enable/disable
   No application changes
   Performance gains
Agenda
 What is the problem?
 Solution
 Compression in SQL Server 2008
Problem

 Large Database
   Storage Cost
   Workload Performance
   Manageability Cost
     Backup/Recovery
Solution
 Reduce the size of the database
    Reduce the information stored
    Compress the data
      Compress the data file
          No benefit in-memory
          Need to compress larger chunks, does not scale
          for random access
      Store data efficiently in the row/page
         (+) More data can fit in memory
         (+) Better Performance for I/O bound workload
         (-) Performance degradation for CPU bound workload
Agenda
 What is the problem?
 Solution
 Compression in SQL Server 2008
Compression in SQL Server
 SQL Server 2008
   ROW and PAGE compression
   Backup Compression

 Two key changes
   Efficient storage of data within
   row (both for data and index)
   Reduce Data Redundancy on the page
Efficient Storage in the ROW
 Variable Length Encoding (new row format)

                             4-byte integer
     SQL2005     0       0           0        1   4 bytes


     SQL2008                                  1
     (compression enabled)



  Special Handling of NULL and 0s
  CHAR data type storage optimization
Reduce Data Redundancy:
  Column Prefix
 Factor out common prefix from the same
 column across all rows on the page
 Store these ‘prefix’ values once and then
 reference them from respective columns
 Example:
 Student (Name      VARCHAR (10),
          ID        INT,
           CODE     VARBINARY(3))
Column Prefix
              Page Header

    Lambert    5000000        NULL




       4                    0x5B8D80

      5        20x41        0x41AABB

               20x42        0x5CAABB

               20x43        0x9A4041
                            0x112233
Reduce Data Redundancy:
              Page Dictionary
 Find repeating values across all
 columns on all the rows on the page

 Store these values in a dictionary once and
 reference them from respective columns
Page Dictionary
              Page Header

    Lambert    5000000        NULL     Column prefix

                                       Page Dictionary


      4                     0x5B8D80
                                1

      5        20x41        0x41AABB

               20x42        0x5CAABB

      0        20x43        0x9A4041
      0          1          0x112233
Enabling Compression
 Enterprise Edition only
 Types of data compressions
   ROW
     Stores fixed length values as variable length
     Superset of vardecimal storage format
     Row metadata optimized
     BLOB/LOB is not ROW compressed

    PAGE (includes ROW)
     Column Prefix
     Dictionary
     Only in-row BLOB/LOB can potentially benefit from PAGE
     compression
Enabling Compression
Examples
Unpartitioned table



      Index
     Index            Index


                              Uncompressed
                Table
                Table
                              PAGE Compressed
Enabling Compression
Examples
Latest partition uncompressed
                                              Uncompressed
                                              PAGE Compressed
                                              ROW Compressed

   Jan-Mar   Apr-June   July-Sept   Oct-Dec
Data Compression TSQL Example
CREATE TABLE T (c1 int, c2 char(2000) )
   WITH (DATA_COMPRESSION = ROW)

CREATE TABLE T_Part (c1 int, c2 char(2000) )
   ON somePartScheme (c1)
        WITH
        (DATA_COMPRESSION = PAGE ON PARTITIONS (1-7),
         DATA_COMPRESSION = NONE ON PARTITIONS (8) )

ALTER INDEX CI ON T REBUILD
             WITH (DATA_COMPRESSION=PAGE)
ALTER INDEX CI ON T REBUILD PARTITION = 3
       WITH (DATA_COMPRESSION=PAGE)
Enabling Compression…
 Estimate space savings
   sp_estimate_data_compression_savings

 Space savings depend upon
   Schema
   Data Distribution
Let us estimate ….
DML Operations
 INSERT (PAGE Compressed)
                                  PAGE Compressed
                                  ROW Compressed
    Header          Header
                   CI structure
Table And PAGE Compression
                        Uncompressed
                        PAGE Compressed
                        ROW Compressed
Btree And PAGE Compression
                                               Uncompressed
                                               PAGE Compressed

                             ROOT              ROW Compressed



    INTERNAL      INTERNAL          INTERNAL        INTERNAL




  LEAF         LEAF            LEAF                LEAF
Impact Of Data Compression
 Application
    No changes needed in the application
    Application throughput increase if I/O bound

 Utilities
    All Database Utilities (e.g.
    Backup, Index, DBCC) fully supported
      Gains if I/O bound
Supportability
 DBCC PAGE enhanced
 New Perfmon counters
   Page Compression attempts/sec
   Page Compressed/sec
 New columns in DMVs
   sys.db_index_physical_stats
     compressed_pages_count
   sys.db_index_operational_stats
     Page_compression_success_count
     Page_compression_attempt_count
Summary – Compression
 Can reduce size of database significantly

 Lower total cost of ownership (TCO)

 Easy to enable/disable

 No application changes

 Performance gains
Related Content
Breakout Sessions (session codes and titles)



Interactive Theater Sessions (session codes and titles)



Hands-on Labs (session codes and titles)



Hands-on Labs (session codes and titles)
Track Resources
Resource 1



Resource 2



Resource 3



Resource 4
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
 not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
                                                                           IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Más contenido relacionado

Destacado

Ieee 2013 2014 be,btech dotnet project titles
Ieee 2013 2014 be,btech  dotnet project titlesIeee 2013 2014 be,btech  dotnet project titles
Ieee 2013 2014 be,btech dotnet project titlesRICHBRAINTECH
 
Greetings and introduction
Greetings and introductionGreetings and introduction
Greetings and introductionnoviantylya
 
Lo interesante en la vida eres tú
Lo interesante en la vida eres túLo interesante en la vida eres tú
Lo interesante en la vida eres túMiNiBuDa
 
fifth third bancorp Q3-05
fifth third bancorp  Q3-05fifth third bancorp  Q3-05
fifth third bancorp Q3-05finance28
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Guia curso de ajuste
Guia curso de ajusteGuia curso de ajuste
Guia curso de ajusteTolipaz PDP
 
กีฬาฟุตบอล
กีฬาฟุตบอลกีฬาฟุตบอล
กีฬาฟุตบอลPochchara Tiamwong
 
Analisis estructural por Josué Llantuy
Analisis estructural por Josué LlantuyAnalisis estructural por Josué Llantuy
Analisis estructural por Josué Llantuyjosue1013
 
Educación de adultos
Educación de adultosEducación de adultos
Educación de adultosprogramapodes
 
Power de programa podes
Power de programa podesPower de programa podes
Power de programa podesprogramapodes
 
Chap1 introduction a la mécanique des solides
Chap1   introduction a la mécanique des solidesChap1   introduction a la mécanique des solides
Chap1 introduction a la mécanique des solidesabderrahmen6
 

Destacado (20)

Leccion
LeccionLeccion
Leccion
 
Ieee 2013 2014 be,btech dotnet project titles
Ieee 2013 2014 be,btech  dotnet project titlesIeee 2013 2014 be,btech  dotnet project titles
Ieee 2013 2014 be,btech dotnet project titles
 
Greetings and introduction
Greetings and introductionGreetings and introduction
Greetings and introduction
 
Lo interesante en la vida eres tú
Lo interesante en la vida eres túLo interesante en la vida eres tú
Lo interesante en la vida eres tú
 
fifth third bancorp Q3-05
fifth third bancorp  Q3-05fifth third bancorp  Q3-05
fifth third bancorp Q3-05
 
Informática 8
Informática 8Informática 8
Informática 8
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Guia curso de ajuste
Guia curso de ajusteGuia curso de ajuste
Guia curso de ajuste
 
BLOQUE 2
BLOQUE 2BLOQUE 2
BLOQUE 2
 
กีฬาฟุตบอล
กีฬาฟุตบอลกีฬาฟุตบอล
กีฬาฟุตบอล
 
Altana vortrag
Altana vortragAltana vortrag
Altana vortrag
 
Analisis estructural por Josué Llantuy
Analisis estructural por Josué LlantuyAnalisis estructural por Josué Llantuy
Analisis estructural por Josué Llantuy
 
Calidad y evaluacion-_nov-2005
Calidad y evaluacion-_nov-2005Calidad y evaluacion-_nov-2005
Calidad y evaluacion-_nov-2005
 
Educación de adultos
Educación de adultosEducación de adultos
Educación de adultos
 
Power de programa podes
Power de programa podesPower de programa podes
Power de programa podes
 
Cantlie
CantlieCantlie
Cantlie
 
Paulina acosta hoja de vida
Paulina acosta hoja de vidaPaulina acosta hoja de vida
Paulina acosta hoja de vida
 
Redbullstratos
RedbullstratosRedbullstratos
Redbullstratos
 
الانسان و الظل
الانسان و الظلالانسان و الظل
الانسان و الظل
 
Chap1 introduction a la mécanique des solides
Chap1   introduction a la mécanique des solidesChap1   introduction a la mécanique des solides
Chap1 introduction a la mécanique des solides
 

Similar a Dev Compression

MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 CourseMarcus Davage
 
Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"Lviv Startup Club
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftAmazon Web Services
 
Making MySQL Great For Business Intelligence
Making MySQL Great For Business IntelligenceMaking MySQL Great For Business Intelligence
Making MySQL Great For Business IntelligenceCalpont
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Chris Adkin
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftAmazon Web Services
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomyRyan Robson
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftAmazon Web Services
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift Amazon Web Services
 
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1sunildupakuntla
 
DB2 9 for z/OS - Business Value
DB2 9 for z/OS  - Business  ValueDB2 9 for z/OS  - Business  Value
DB2 9 for z/OS - Business ValueSurekha Parekh
 
Stack It And Unpack It
Stack It And Unpack ItStack It And Unpack It
Stack It And Unpack ItJeff Moss
 
Getting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleGetting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleNizameddin Ordulu
 
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...Severalnines
 
Getting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDBGetting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDBAmazon Web Services
 
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & Spectrum
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & SpectrumABD304-R-Best Practices for Data Warehousing with Amazon Redshift & Spectrum
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & SpectrumAmazon Web Services
 
Db2 performance tuning for dummies
Db2 performance tuning for dummiesDb2 performance tuning for dummies
Db2 performance tuning for dummiesAngel Dueñas Neyra
 

Similar a Dev Compression (20)

MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
 
Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"Maryna Popova "Deep dive AWS Redshift"
Maryna Popova "Deep dive AWS Redshift"
 
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon RedshiftBest Practices for Migrating Legacy Data Warehouses into Amazon Redshift
Best Practices for Migrating Legacy Data Warehouses into Amazon Redshift
 
Making MySQL Great For Business Intelligence
Making MySQL Great For Business IntelligenceMaking MySQL Great For Business Intelligence
Making MySQL Great For Business Intelligence
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)
 
SQLServer Database Structures
SQLServer Database Structures SQLServer Database Structures
SQLServer Database Structures
 
Vertica
VerticaVertica
Vertica
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
 
DB2 9 for z/OS - Business Value
DB2 9 for z/OS  - Business  ValueDB2 9 for z/OS  - Business  Value
DB2 9 for z/OS - Business Value
 
Stack It And Unpack It
Stack It And Unpack ItStack It And Unpack It
Stack It And Unpack It
 
Getting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleGetting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scale
 
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...
Webinar slides: Severalnines & MariaDB present: Automation & Management of Ma...
 
Getting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDBGetting Started with Amazon DynamoDB
Getting Started with Amazon DynamoDB
 
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & Spectrum
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & SpectrumABD304-R-Best Practices for Data Warehousing with Amazon Redshift & Spectrum
ABD304-R-Best Practices for Data Warehousing with Amazon Redshift & Spectrum
 
Db2 performance tuning for dummies
Db2 performance tuning for dummiesDb2 performance tuning for dummies
Db2 performance tuning for dummies
 

Más de rsnarayanan

Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platformrsnarayanan
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnetrsnarayanan
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Datarsnarayanan
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deploymentrsnarayanan
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3rsnarayanan
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...rsnarayanan
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlightrsnarayanan
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systemsrsnarayanan
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Servicesrsnarayanan
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...rsnarayanan
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Libraryrsnarayanan
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sqlrsnarayanan
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developersrsnarayanan
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1rsnarayanan
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developersrsnarayanan
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8rsnarayanan
 

Más de rsnarayanan (20)

Walther Aspnet4
Walther Aspnet4Walther Aspnet4
Walther Aspnet4
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
Kevin Ms Web Platform
Kevin Ms Web PlatformKevin Ms Web Platform
Kevin Ms Web Platform
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
 
Walther Mvc
Walther MvcWalther Mvc
Walther Mvc
 
Harish Aspnet Dynamic Data
Harish Aspnet Dynamic DataHarish Aspnet Dynamic Data
Harish Aspnet Dynamic Data
 
Harish Aspnet Deployment
Harish Aspnet DeploymentHarish Aspnet Deployment
Harish Aspnet Deployment
 
Whats New In Sl3
Whats New In Sl3Whats New In Sl3
Whats New In Sl3
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
 
Advanced Silverlight
Advanced SilverlightAdvanced Silverlight
Advanced Silverlight
 
Netcf Gc
Netcf GcNetcf Gc
Netcf Gc
 
Occasionally Connected Systems
Occasionally Connected SystemsOccasionally Connected Systems
Occasionally Connected Systems
 
Developing Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And ServicesDeveloping Php Applications Using Microsoft Software And Services
Developing Php Applications Using Microsoft Software And Services
 
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
Build Mission Critical Applications On The Microsoft Platform Using Eclipse J...
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
Ms Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My SqlMs Sql Business Inteligence With My Sql
Ms Sql Business Inteligence With My Sql
 
Windows 7 For Developers
Windows 7 For DevelopersWindows 7 For Developers
Windows 7 For Developers
 
What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1What Is New In Wpf 3.5 Sp1
What Is New In Wpf 3.5 Sp1
 
Ux For Developers
Ux For DevelopersUx For Developers
Ux For Developers
 
A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8A Lap Around Internet Explorer 8
A Lap Around Internet Explorer 8
 

Último

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Último (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Dev Compression

  • 1.
  • 2. Vinod Kumar M Technology Evangelist – DB and BI Microsoft Corporation www.ExtremeExperts.com
  • 3. Session Objectives And Takeaways Session Objectives Why data compression? Describe data compression in SQL Server Describe Space/Performance trade-offs Key Takeaways Can reduce size of a database significantly Easy to enable/disable No application changes Performance gains
  • 4. Agenda What is the problem? Solution Compression in SQL Server 2008
  • 5. Problem Large Database Storage Cost Workload Performance Manageability Cost Backup/Recovery
  • 6. Solution Reduce the size of the database Reduce the information stored Compress the data Compress the data file No benefit in-memory Need to compress larger chunks, does not scale for random access Store data efficiently in the row/page (+) More data can fit in memory (+) Better Performance for I/O bound workload (-) Performance degradation for CPU bound workload
  • 7. Agenda What is the problem? Solution Compression in SQL Server 2008
  • 8. Compression in SQL Server SQL Server 2008 ROW and PAGE compression Backup Compression Two key changes Efficient storage of data within row (both for data and index) Reduce Data Redundancy on the page
  • 9. Efficient Storage in the ROW Variable Length Encoding (new row format) 4-byte integer SQL2005 0 0 0 1 4 bytes SQL2008 1 (compression enabled) Special Handling of NULL and 0s CHAR data type storage optimization
  • 10. Reduce Data Redundancy: Column Prefix Factor out common prefix from the same column across all rows on the page Store these ‘prefix’ values once and then reference them from respective columns Example: Student (Name VARCHAR (10), ID INT, CODE VARBINARY(3))
  • 11. Column Prefix Page Header Lambert 5000000 NULL 4 0x5B8D80 5 20x41 0x41AABB 20x42 0x5CAABB 20x43 0x9A4041 0x112233
  • 12. Reduce Data Redundancy: Page Dictionary Find repeating values across all columns on all the rows on the page Store these values in a dictionary once and reference them from respective columns
  • 13. Page Dictionary Page Header Lambert 5000000 NULL Column prefix Page Dictionary 4 0x5B8D80 1 5 20x41 0x41AABB 20x42 0x5CAABB 0 20x43 0x9A4041 0 1 0x112233
  • 14. Enabling Compression Enterprise Edition only Types of data compressions ROW Stores fixed length values as variable length Superset of vardecimal storage format Row metadata optimized BLOB/LOB is not ROW compressed PAGE (includes ROW) Column Prefix Dictionary Only in-row BLOB/LOB can potentially benefit from PAGE compression
  • 15. Enabling Compression Examples Unpartitioned table Index Index Index Uncompressed Table Table PAGE Compressed
  • 16. Enabling Compression Examples Latest partition uncompressed Uncompressed PAGE Compressed ROW Compressed Jan-Mar Apr-June July-Sept Oct-Dec
  • 17. Data Compression TSQL Example CREATE TABLE T (c1 int, c2 char(2000) ) WITH (DATA_COMPRESSION = ROW) CREATE TABLE T_Part (c1 int, c2 char(2000) ) ON somePartScheme (c1) WITH (DATA_COMPRESSION = PAGE ON PARTITIONS (1-7), DATA_COMPRESSION = NONE ON PARTITIONS (8) ) ALTER INDEX CI ON T REBUILD WITH (DATA_COMPRESSION=PAGE) ALTER INDEX CI ON T REBUILD PARTITION = 3 WITH (DATA_COMPRESSION=PAGE)
  • 18. Enabling Compression… Estimate space savings sp_estimate_data_compression_savings Space savings depend upon Schema Data Distribution
  • 20. DML Operations INSERT (PAGE Compressed) PAGE Compressed ROW Compressed Header Header CI structure
  • 21. Table And PAGE Compression Uncompressed PAGE Compressed ROW Compressed
  • 22. Btree And PAGE Compression Uncompressed PAGE Compressed ROOT ROW Compressed INTERNAL INTERNAL INTERNAL INTERNAL LEAF LEAF LEAF LEAF
  • 23. Impact Of Data Compression Application No changes needed in the application Application throughput increase if I/O bound Utilities All Database Utilities (e.g. Backup, Index, DBCC) fully supported Gains if I/O bound
  • 24. Supportability DBCC PAGE enhanced New Perfmon counters Page Compression attempts/sec Page Compressed/sec New columns in DMVs sys.db_index_physical_stats compressed_pages_count sys.db_index_operational_stats Page_compression_success_count Page_compression_attempt_count
  • 25.
  • 26. Summary – Compression Can reduce size of database significantly Lower total cost of ownership (TCO) Easy to enable/disable No application changes Performance gains
  • 27.
  • 28.
  • 29. Related Content Breakout Sessions (session codes and titles) Interactive Theater Sessions (session codes and titles) Hands-on Labs (session codes and titles) Hands-on Labs (session codes and titles)
  • 30. Track Resources Resource 1 Resource 2 Resource 3 Resource 4
  • 31. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.