Shell script `nguyen/db-size'

Get table stats (size, rows)

echo " SELECT table_rows AS rows, round(((data_length + index_length) / 1024 / 1024), 2) AS size, table_schema AS db, table_name AS name FROM information_schema.TABLES WHERE table_schema <> 'mysql' AND table_schema <> 'information_schema' AND table_schema <> 'performance_schema' ORDER BY (data_length + index_length) DESC;" | mysql