My Oracle Support Banner

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

Last updated on JULY 05, 2023

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version to [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.


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?


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

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