Optimizing Database disk space using Alter table shrink space/move compress

(Doc ID 1173241.1)

Last updated on MAY 31, 2017

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

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 hundreds of Community platforms