MySQL features a series of statements that can (and should) be used to ensure that databases are correct and functioning properly. Here are some statements you should be aware of:
• Input ANALYZE TABLE orders; • Output +--------------------+---------+----------+----------+ | Table | Op | Msg_type | Msg_text | +--------------------+---------+----------+----------+ | crashcourse.orders | analyze | status | OK | +--------------------+---------+----------+----------+
• Input CHECK TABLE orders, orderitems; • Output +------------------------+-------+----------+-----------------------+ | Table | Op | Msg_type | Msg_text | +------------------------+-------+----------+-----------------------+ | crashcourse.orders | check | status | OK | | crashcourse.orderitems | check | warning | Table is marked as | | | | | crashed | | crashcourse.orderitems | check | status | OK | +------------------------+-------+----------+-----------------------+
|