mysql optimize all tables in database code example Example: mysql optimize table OPTIMIZE TABLE [table]