linux:memo_sql
Mémo mysql / mariadb
La liste des tables avec leur taille
SELECT TABLE_NAME AS "Table", table_rows AS "Nb enregistrements", ROUND(data_length / 1024 / 1024, 2) AS "Données (Mo)", ROUND(index_length / 1024 / 1024, 2) AS "Index (Mo)", ROUND((data_length + index_length) / 1024 / 1024, 2) AS "Taille totale (Mo)" FROM information_schema.tables WHERE table_schema = DATABASE() ORDER BY (data_length + index_length) DESC;
virer le where pour avoir toutes les bases.
linux/memo_sql.txt · Dernière modification : de daniel
