MyISAM is a default Storage engine for Mysql server and InnoDB is also a storage engine. MyISAM 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 be created only with the myisampack utility.
myisamchk can be used to repair, check and optimize database tables.and it’s secure.
MyISAM table maintenance can also be done using the SQL statements
- Check table
CHECK TABLE table_name FAST QUICK;
If check table is corrupted , the problem is mostly in indexes 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.
This statement needs select and insert privileges for the table.
- Optimize table syntax
OPTIMIZE [no_write_to_binlog | LOCAL] TABLE tbl_name [, tbl_name]…
Eg. OPTIMiZE TABLE tbl_name;