Moving a table to a different tablespace in Oracle using Online Redefinition Vs Alter table move tablespace

alter-tabledbms-redefinitionoracle

I have a table with 1 Billion records with size 300GB to move to different tablespace.
My question here is – What is the advantage of using DBMS_REDEFINITION (Online redefinition) package
over Alter table move ;
Which one is fast and why?
Can we have DML access to table in either ways of moving the table?

Thanks in advance

Best Answer

Those two methods are very different.

Alter table mytable move mytablespace

will move all the data blocks into the new tablespace. while it doing so, the table will be locked for DML.

DBMS_REDEFINITION will allow you to create a new table on the desired tablespace and sync the data between them ONLINE. when the sync ends the tables names will be switched. you will have to be careful with DBMS_REDEFINITION as you have to create the new table youself including indexes, constraints, partition, privs, etc.