I have a question regarding Alter a table , Please pass your value inputs .
I am planning to add PPI to my table on one field say col2, but that field is having compression values, So what I have in my mind is
1. create a new table as old table with no data and stats;
2. alter table newtable ADD col2 NO COMPRESS;
3.ALTER TABLE newtable MODIFY PRIMARY INDEX ( col1) PARTITION BY RANGE_N (CASE WHEN col2 ..........);
4. insert into newtable sel * from old table ;
5. drop the old table, rename the new table to original table
1. rename the oldtable to backup table
2. create a newtable with the required structure;
3.insert into new table from the backup table;
4. drop the backup table;
what makes the big difference for the above two methods?
Will alter table no compress has to alter the table header as well as every data block of that table. Hence, there will be a chance of table corruption for empty tables as well?