user989990
user989990

Reputation: 175

Do I need to manually rebuild a innodb table with massive deletes on MYSQL?

I am currently deleting 9 million rows of a table with 11 million incrementally by 200,000 rows per run.

Will I need to manually rebuild the table and indexes or does this happen automatically after every delete?

Upvotes: 1

Views: 1810

Answers (1)

Mike Purcell
Mike Purcell

Reputation: 19999

Yes, you have to manually rebuild the table, you can do so like this:

ALTER TABLE database.table ENGINE=InnoDB;

Upvotes: 1

Related Questions