Alter table Alter column PerformancePosted: - Source : stackoverflow
We have a table with more than 10million rows.
We are altering its column type like this:
ALTER TABLE MY_TABLE ALTER COLUMN MY_COLUMN VARCHAR(3)
What would be the fastest way to do this? Alter column needs to touch EVERY row right? Is there a way to make this faster?
According to questions and answers here, I'm thinking about, create a new table and migrate data, or create a new column with
VARCHAR(3) and migrate only the data inside this column and drop the old column.
Obs. It's taking more than 3hrs.