Disabling Compression for file_per_table Tables

To disable compression, execute the ALTER table and specify ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPACT, followed by KEY_BLOCK_SIZE=0.

For example, if you do not want compression on the event_history table:

mysql> ALTER TABLE event_history ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;Query OK, 0 rows affected (0.53 sec)Records: 0  Duplicates: 0  Warnings: 0

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.