Why does MySQL add comment to InnoDB tables?

When using phpMyAdmin or the MySQL GUI tools every time I create an InnoDB table, it adds a comment to the table as follows:

InnoDB Free: 9216 kB

What does it mean? What was it used for?

+5
mysql innodb
source share
1 answer

InnoDB stores many tables per file. There may be free space inside the InnoDB data file:

  • When deleting a table or index, delete the rows or replace the rows with smaller ones (for example, shorter text)
  • File increases by 1 MB at a time (in my.cnf)

The comment just tells you how much free space is in your InnoDB data files. When it approaches 0, InnoDB will expand the data file.

I believe that the default distribution block is 10 MB, so you probably have almost 10 MB for free.

+9
source share

All Articles