Sample Header Ad - 728x90

Alter Table Drop Column INPLACE NoLock - until which point is the column being dropped accessible?

1 vote
1 answer
2810 views
I am trying to run MySQL Alter INPLACE command to drop few columns from a very large 90GB table. While the Alter is running I am able to run the Select statement on the same table to ensure that the table is not locked. MySQL Version 5.7 with InnoDB Questions: 1. While the alter command is running with in place algorithm and nolock, up to what point the data can be accessed in the columns being dropped? e.g. at the point when the columns are almost being dropped? I need to make this change in prod so need to make sure of this. 2. Can the application still update the table while the alter statement to drop the columns is running? Currently the columns are stored and after dropping them we will be adding them back as Virtual. 3. Will there be any downtime at all, I read somewhere that the table will be locked shortly at the end, correct me if I am wrong.
Asked by Ali (345 rep)
Aug 20, 2021, 06:08 AM
Last activity: Aug 25, 2022, 08:07 PM