MyISAM Table Maintenance and Crash Recovery
MyISAM Table Maintenance, that’s a default Storage engine for MySQL server and InnoDB is also a storage engine. This supports three different storage format.
Two of them, fixed and dynamic format, are chosen automatically depend on type of columns you’re using. The third, compressed format, can use to create only with the myisampack utility.
myisamchk can be used to repair, check and optimise database tables.and it’s secure.
MyISAM table maintenance can use the SQL statements
- Check table
CHECK TABLE table_name FAST QUICK;
If check table corrupted, the problem mostly occurs in indexes but not in the data part.
- Repair table syntax
Repair [no_write_to_binlog | LOCAL] TABLE tbl_name [, tbl_name]… [QUICK] [EXTENDED] [USE_FRM]
Eg. REPAIR TABLE tbl_name;
Repair table repairs corrupted table, for certain storage engine only and this statement needs select and insert privileges for the table.
Check Out : Installation of MySQL Workbench 8.0.16 On Ubuntu
- Optimise table syntax
OPTIMIZE [no_write_to_binlog | LOCAL] TABLE tbl_name [, tbl_name]…
Eg. OPTIMiZE TABLE tbl_name;