Home > Software engineering >  Is shrinking and deallocating space necessary after Advanced Table Compression?
Is shrinking and deallocating space necessary after Advanced Table Compression?

Time:04-09

There is a table that holds 10 GB of data without any compress assigned to it. A decision was made to use advanced compresion on this table to reduce amount of space it consumed. After running the below command :

ALTER TABLE table_name MOVE ONLINE ROW STORE COMPRESS ADVANCED 
                      UPDATE INDEXES PARALLEL 5 NOLOGGING  ;

space it used was reduced to 5.6 GB. Is this the final point of efficient usage of space?

Or should I run alter table shrink space and deallocate space too on this table after compression is done? Couldn't find enough information on this

CodePudding user response:

A "MOVE" is a full reorganisation of the table, so all blocks are completely rewritten, and any space freed up is released back to the tablespace(s) that contain the table.

No further reclamation steps are necessary.

  • Related