Will a MySQL server stop working if it runs out of disc space, but has a lot of data_free?
I have a several tables which have very high volume inserts and deletes. Data stays in the table for about 2 hours before being removed. At any one point there is far less data on the sever than available disc space.
Howe开发者_StackOverflowver, since disc space isn't freed on row DELETEs the tables just keep increasing in size.
I can get the table sizes back down to reasonable levels by running OPTIMIZE on them. However this takes down the system for longer than I'd like and doesn't seem like an efficient solution.
Do I need to do this? Will MySQL recover the disc space in data_free itself when it's about to run out? I don't want to risk just waiting for this to happen as I know how difficult it is to recover an MySQL server once it runs out of disc space.
No, MySQL will not recover the disc space - if you run out of disc space the system will come to a complete standstill and you may lose data. Some tables may also be marked as crashed and will need to be repaired. (This happened to me once or twice...)
精彩评论