'Is OPTIMIZE / ANALYZE required after mysql table TRUNCATE?

In mysql database, I have about 20 tables (data size is very small - most of the tables have about 1,000 to 20,000 records, only one table has 200,000 records). These tables are being truncated and reloaded fully every day.

Does truncate data every day cause database pages fragmentation?

Should i run analyze and optimize table on them? if so then how often?

Please advise!

Thank you!



Solution 1:[1]

When a table is deleted or truncated, InnoDB will leave the empty space, and use it for subsequent insertion of new row versions.

Truncating table does not make the mysql file smaller

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 petunse