Background Info
Let's say I have a table in MySQL that has +1 billion records. I have a column with that contains some description of a post. We don't index, search, or sort this column in any way.
Currently the description
column has an encoding of utf8
, which in MySQL doesn't support the full unicode standard. I want to add support for emojis, other languages, etc. so I need the column to be utf8mb4
Question
If I run something along the lines of:
ALTER TABLE
user_posts
CHANGE post_description
VARCHAR(300)
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
What actually happens in the background, and would it have a massive performance impact during the operation on a very large table with (+1 billion rows)?
Since there is no index, sorting, or searching in this column, would it need to modify each record? oOr since the current utf8
records won't be changing will it just change the table schema. O(n) or O(1)