mysql myisam table

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

  1. Check table

CHECK TABLE table_name FAST QUICK;

If check table is corrupted , the problem is mostly in indexes not in the data part.

  1. 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.

  1. Optimize table syntax

OPTIMIZE  [no_write_to_binlog | LOCAL] TABLE  tbl_name [, tbl_name]…

Eg.  OPTIMiZE TABLE tbl_name;

You’re done

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here