My Oracle Support Banner

Optimizing Database disk space using Alter table shrink space/move compress (Doc ID 1173241.1)

Last updated on NOVEMBER 24, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.4 to 11.2.0.2 [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1]
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
Information in this document applies to any platform.

Goal

Discussion of ways to optimize space in a database:

Q1. How to minimize the tablespace usage for a read-only database?
Q2. Is it recommended to perform shrink space for all tables and indexes?
Q3. Does "alter table <owner.table shrink space" adjust the datafile high water mark?
Q4. What are the expected benefits of "Alter table <owner.table> move compress"?
Q5. If not using exp/imp to move tables to another tablespace, Does that mean "alter table <...> move compress" is not a good option?
Q6. Steps below didn't lower data file highwatermark, Why?
Q7. How to calculate the allocated blocks for a table?
Q8. How to view the actual unallocated blocks for a datafile?

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!


In this Document
Goal
Solution
References


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