MySQL: obtenir la taille des tables d'une base


Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /srv/ruban.stephanemourey.fr/src/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1530

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /srv/ruban.stephanemourey.fr/src/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1530

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /srv/ruban.stephanemourey.fr/src/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1530
SELECT  TABLE_NAME AS `Table`,  ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)` FROM  information_schema.TABLES WHERE  TABLE_SCHEMA = "nom_base" ORDER BY  (DATA_LENGTH + INDEX_LENGTH) DESC
SELECT
  TABLE_NAME AS `Table`,
  ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)`
FROM
  information_schema.TABLES
WHERE
  TABLE_SCHEMA = "nom_base"
ORDER BY
  (DATA_LENGTH + INDEX_LENGTH)
DESC;

Source