Will MySQL rewrite complete record when updating single column?

I’m working with a MySQL table that has several columns including device_id, last_ping, and config_blob. The last_ping column gets updated very often using queries like: sql UPDATE devices SET last_ping = CURRENT_TIMESTAMP WHERE device_id IN (...) My config_blob column doesn’t change much but it stores large amounts of data (around 5-50kb each record). I’m seeing high CPU usage during write operations and wondering if this setup is causing performance issues. Does MySQL have to rewrite the whole record when I only modify the last_ping field? Should I consider moving the config_blob data to a different table to improve performance?

The storage engine plays a crucial role in MySQL updates. For instance, when using InnoDB, updating a single column typically does not require the entire row to be rewritten unless there is a significant change in row size. However, large columns like config_blob can still impact performance due to issues such as page splitting and buffer pool management. To enhance performance, consider normalizing your database by separating the config_blob data into a different table and linking it via a foreign key. This approach keeps your main table rows smaller, leading to more efficient updates for frequently changing columns like last_ping.

mySQL doesn’t always rewrite the whole row with column updates. but yeah, if u have big data like config_blob, it can be problematic when sizes change. if only updating timestamps, full rewrites shouldn’t happen unless a lot of fragmentation occurs.