My Oracle Support Banner

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

Last updated on FEBRUARY 02, 2022

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.


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 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'



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

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

In this Document
 Resulting Data:  Space occupied using different COMPRESS options

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