2. WHY DATA COMPRESSION………?
• Compressing data reduces database storage,
which leads to fewer I/O reads and writes
• it is important to understand the workload
characteristics when deciding which tables
to compress.
• Customer and Feedbacks.
4. LET’S COMPRESS USING ROW COMPRESSION
• The metadata overhead of the record is reduced.
• All numeric (for example integer, decimal, and float) and numeric-based (for example
datetime and money) data type values are converted into variable length values.
• the values stored like (integer - 4 bytes),(date time - 8 bytes), but after compression all
unconsumed space is reclaimed.
• If a value 100 is stored in an integer-type column. We know an integer value between 0 and
255 can be stored in 1 byte. However, it reserves 4 bytes (integer type takes 4 bytes) on disk.
Here, after compression, 3 bytes are reclaimed.
5. LET’S COMPRESS USING PAGE COMPRESSION
• Row Compression As Discussed
• prefix compression
• Dictionary compression
7. DICTIONARY COMPRESSION
• Detect the common pattern
• Create a dictionary based on the pattern and Replace the Values using the pattern.
8.
9. DISADVANTAGES USING COMPRESSION
• Only certain data types will compress
• If you have CPU issues compressing database objects may intensify those issues