I've looked up other storage engines about how to shrink the database file.
For example, sqlite use autovacuum to truncate the free page at the end of file
wiredtiger use COMPACT to do the similar thing: move valid blocks to the beginning of file, and truncate the end free blocks.
I know innodb has provided OPTIMIZE TABLE. I'm eager to know how it shrink the file. I'm reading the source code (`fts_optimize_table`) at the same time, but really hope someone could give some guidances. Any documentation or blog will be appreciated.
For example, sqlite use autovacuum to truncate the free page at the end of file
wiredtiger use COMPACT to do the similar thing: move valid blocks to the beginning of file, and truncate the end free blocks.
I know innodb has provided OPTIMIZE TABLE. I'm eager to know how it shrink the file. I'm reading the source code (`fts_optimize_table`) at the same time, but really hope someone could give some guidances. Any documentation or blog will be appreciated.