Compress database in oracle 11g

I am not a database administrator in any way, so I may be mistaken in declaring some things here.

In SQL Server, when we add a large amount of data to the database, and then when we delete it, the size of the data files (.mdf file) or database (or whatever it is called) does not come down to the original size. We need to squeeze it.

Does Oracle have the same basics? If so, how should I change the Oracle 11g database?

+2
source share
1 answer

Full explanation from Oracle documentation: Reclaiming Wasted Space . For the short version:

"You can reduce the space in the table, indexed table, index, section, division, materialized view or materialized view log. You do this using ALTER TABLE, ALTER INDEX, ALTER MATERIALIZED VIEW LOG using the SHRINK SPACE clause" .

So, after starting the Oracle Segment Advisor to recommend areas for compression, something like the following will reduce the space in the table called mytable .

 SQL> alter table mytable enable row movement; Table altered SQL> alter table mytable shrink space; Table altered 
+6
source

All Articles