Mysql List Bigger Table

[Solved] Mysql List Bigger Table | Sql - Code Explorer | yomemimo.com
Question : mysql list bigger table

Answered by : nasty-narwhal-osmnihy27zrc

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;

Source : https://tableplus.com/blog/2018/04/mysql-get-size-of-tables.html | Last Update : Fri, 08 Jan 21

Question : mysql list tables by size

Answered by : -1vajs8k9qntw

/*replace your_database_name with your db name, and then run this:*/
SELECT TABLE_NAME, table_rows, data_length, index_length,
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES WHERE table_schema = "your_database_name"
ORDER BY (data_length + index_length) DESC;

Source : https://stackoverflow.com/questions/14569940/mysql-list-tables-and-sizes-order-by-size | Last Update : Sun, 06 Feb 22

Answers related to mysql list bigger table

Code Explorer Popular Question For Sql