MySQL Forums
Forum List  »  InnoDB

Internals about how innodb shrink database file with OPTIMIZE TABLE ?
Posted by: Lewis Chan
Date: January 12, 2022 12:54AM

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.

Options: ReplyQuote


Subject
Views
Written By
Posted
Internals about how innodb shrink database file with OPTIMIZE TABLE ?
556
January 12, 2022 12:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.