Tables with no rows not empty I've got a couple of tables that get cleared out regularly by a cron job on a web server. However when these tables are completely empty it looks like there is still data in them.

e.g. This database is showing 2 tables that have 0 rows, yet their size is not 0. If i truncate the tables they do go down to 0.

The only additional data I can think of that might be contained in these tables are the auto increment number of the id fields, but considering the number in the first table is only at 29 as of the screenshot 117Kb seems quite a lot for such a small bit of data.



Sorry if this is an incredibly obvious answer, I don't know a huge amount about how databases actually work.
TRUNCATE effectively drops and re-creates the table, so the allocated space is gone. A DELETE... command will only remove the rows but does not cause the table size on disk to automatically shrink. This would cause excessive I/O for every DELETE... command to shrink files if it were true.

Truncate Reference for MySQL 5.7