Tags

, ,

MySQL tables statistics / MySQL tables status 

To get the MySQL table status and to get more information about table (size, engine, no. of rows etc.), following is the very useful command.

SHOW TABLE STATUS [{FROM | IN} db_name] [LIKE 'pattern' | WHERE expr]
//If you have selected a database then run the following command:
SHOW TABLE STATUS LIKE '%'

MySQL returns information about all the tables in the selected database. For more info about what MySQL returns, http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html.

If you want to see information about a particular table in a particular database then you run the command as follows:

SHOW TABLE STATUS FROM <database name> LIKE '<table name>'
Advertisements