How to split InnoDB file


Depending on your version, MySQL might create one file to hold all InnoDB tables in a single file called ibdata1. It contains everything, the data as well as indexes. For most systems this is perfectly fine. Sometimes if you want to be able to reclaim space if a table is dropped, it might be beneficial to have multiple files.


Simply set innodb_file_per_table to ON or OFF.

Please note that you can't easily copy a InnoDB table file, even if you have multiple tablespaces.


Please sign-in to post a comment