views:

41

answers:

2

Say if there is a database that has 200 tables, is there a quick way to see how many records are in each table, if possible, sorted by the number of records descendingly? thanks.

+2  A: 

Does show table status work for your problem? It has the row counts?

Rob Di Marco
Warning: This is accurate for MyISAM, but the row count for InnoDB is just an estimate.
Ike Walker
the result is very wide, can't show each row on 1 line even when console is 250 characters wide. Is there a way to selectively show parts of this table (and sorted on count)?
動靜能量
+2  A: 
SELECT table_name,
       table_rows
  FROM `information_schema`.`tables`
 WHERE table_schema = '<Your Database Name>'
 ORDER BY table_rows DESC
Mark Baker
Again: This is accurate for MyISAM, but the row count for InnoDB is just an estimate.
Ike Walker