Smaller is Betterישי גרין| ראש צוות DBA| הבורסה לניירות ערך
Data Compression – Why bother?Physical Compression MethodsLogical Compression Methods
3
4
5
6
Data Compression – Whybother?The bigger the data – the bigger the challenges
Data Compression – Whybother?Every action takes longerData Access Queries
Loading data volumes
Archiving
Maintenance (backups, fragmentation, 				     statistics, data replications…)
Storage constraintsPhysical Compression MethodsArchivingData compression (SQL 2008)Smaller data typesHorizontal PartitioningVertical Partitioning
Archiving  The most efficient way to minimize data in OLTPGood: Archive data into a Archive Repository
Better: Archive data to flat files or other media 		(BCP out)
Best: Purge data. Retrieve data from backup 		ifneeded.Data compression (SQL 2008)Compression TypeData CompressionTable level
Index levelBackup CompressionCompression MethodsRow CompressionPage Compression
Data compression (SQL 2008)Row CompressionStoring fixed-length data types in variable-length storage format.   A compressed row uses 4 bits per compressed column to store the length of the data in the column.
Data compression (SQL 2008)Row Compression13
Data compression (SQL 2008)PAGE Compressiona superset of row compression.     optimizes storage of multiple rows in a page, by minimizing the data redundancy. Page compression uses prefix compression and dictionary compression. Prefix compression looks for common patterns in the beginning of the column values on a given column across all rows on each page.
Dictionary compression looks for exact value matches across all columns and rows on each page. 1414
Data compression (SQL 2008)PAGE Compression  Prefix Compression  Dictionary Compression15
Data compression (SQL 2008)Performance16
Data compression (SQL 2008)Performance17
Data compression (SQL 2008)Performance - Summary			CPU      IOBetter performance when IO is a bottleneck
Reduces storage needs significantly
Use advisory procedure to calculate compressionUsing Smallest Data Type Available19
Using Smallest Data Type AvailableExamples:Char (large fixed value)  Varchar (large value)
UniCode data type  NonUnicode
Datetime  SmallDateTime
Datetime  Date
Datetime  Time20
PartitioningDefinition:    Breakup a table or index into smaller parts, that when stitched recreate the original object.Types of Partitioning:HorizontalVertical21
Horizontal PartitioningEach table maintains a similar schema, but  contains fewer rows.
There is no data overlap between the partitions.

2 extreme performance - smaller is better