User Tools

Site Tools


table_size

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
table_size [2017/02/23 08:51] luke7858table_size [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 3: Line 3:
 <sxh bash> <sxh bash>
 SELECT table_name AS "Table", SELECT table_name AS "Table",
 +
 round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
 +
 FROM information_schema.TABLES FROM information_schema.TABLES
 +
 WHERE table_schema = "DATABASE_NAME" WHERE table_schema = "DATABASE_NAME"
 +
 ORDER BY (data_length + index_length) DESC LIMIT 15; ORDER BY (data_length + index_length) DESC LIMIT 15;
 </sxh> </sxh>
table_size.1487839900.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki