diff -r 653a83760554 -r 7627e51556bf mysql.rst --- a/mysql.rst Fri Jan 22 22:05:15 2016 +0200 +++ b/mysql.rst Fri Jan 22 22:10:18 2016 +0200 @@ -60,10 +60,28 @@ MariaDB [mysql]> SHOW GRANTS; -Table sizes:: +Table/index sizes. +================== +:: MariaDB [mysql]> SHOW TABLE STATUS FROM mydb; + SELECT + table_schema as `Database`, + table_name AS `Table`, + round(((data_length + index_length) / 1024 / 1024), 2) `Size, MiB` + FROM information_schema.TABLES + ORDER BY (data_length + index_length) DESC; + + SELECT + table_schema as `Database`, + table_name AS `Table`, + round((data_length / 1024 / 1024), 2) `Data, MiB`, + round((index_length / 1024 / 1024), 2) `Index, MiB`, + round(((data_length+index_length) / 1024 / 1024), 2) `Total, MiB` + FROM information_schema.TABLES + ORDER BY (data_length + index_length) DESC; + System information. ===================