![]() ![]() See If you do that, you should be able to use OPTIMIZE TABLE or ALTER TABLE on each InnoDB table that you want to shrink. Restore all your InnoDB tables, which expands the tablespace file as needed.Īnother solution is to use the option to store InnoDB tables in a separate file per table. ![]() Restart MySQL Server, which recreates a new, small tablespace file.ĥ. Physically delete the ibdata1 file at the filesystem interface.Ĥ. Backup *all* InnoDB tables with mysqldump.ģ. One solution to shrinking a shared InnoDB tablespace is:ġ. So InnoDB's behavior is to leave the empty space, and use it for subsequent insertion of new row versions. Typically, MySQL table rebuilds require both the old and the new storage to exist simultaneously on disk during the operation. Step 1 - Open your database in phpMyAdmin Step 2 - Click Databases in the top-menu Step 3 - Click the name of the database you want to optimize Step 4. Imagine if you have a 100GB tablespace file, and you want to perform a rebuild to compact it. It would be a very expensive operation for the MySQL Server to compact the used space in the tablespace file and shrink the file. This is a limitation of InnoDB's shared tablespace file.
0 Comments
Leave a Reply. |