My Oracle Support Banner

11g Advanced Compression - How to Check Space Occupied by LOB Compression (Doc ID 861344.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.


Goal

This note shows how LOB columns can be compressed and storage savings can be gained by using Oracle 11g Advanced Compression features.

The example script calculates (1) space used, (2) space saved between an uncompressed LOB column and a compressed LOB column, and (3) space saved between a compressed LOB column and a compressed LOB column with the DEDUPLICATE option.

The below table shows space occupied by tables with different COMPRESS option after loading some data:

 BasicFile (no compress)SecureFile (compress)SecureFile (compress & deduplicate)
Space Used in Bytes 4423680 1236992 49152
Space Used in Blocks 540 151 6

 

NOTE:
Note that a table can be compressed without compressing LOB data as both are stored in different segments.
Please refer to:
  Oracle® Database Concepts
  11g Release 2 (11.2)
  Part Number E25789-01
  Chapter 2 Tables and Table Clusters
  Section 'Table Compression'
 

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.