If I drop an innodb table when will the disk space be reclaimed?
Does it happen immediately?
How about with records instead of the entire table?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on whether you enabled the
innodb_file_per_tableserver setting or not.If
innodb_file_per_tableis enabled, then each table stores its data in a separate .ibd file. Otherwise the data for all tables is stored in a shared .ibd file.With
innodb_file_per_table:OPTIMIZE TABLE) will free up the disk space.Without
innodb_file_per_table: