Daniel Wehner's blog

Logo
  • About
  • Boardgames
  • Media
  • Projects

Show largest mysql tables

1 min read 2019-08-05

Here is a small sql commando to show the largest mysql tables on your system.

SELECT 
     table_schema as `Database`, 
     table_name AS `Table`, 
     round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 
FROM information_schema.TABLES 
ORDER BY (data_length + index_length) DESC
LIMIT 10;

Thank you http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/ for the code.


  • mysql
Daniel Wehner (he / him / his) Engineer, runner, climber, rower in London
  • RSS feed
  • Github
  • Twitter
  • Mastodon