posts
Find mysql Table Size
Sep 22, 2017
| 2 min read
|
Chris Zietlow
Recovering Software Engineer, Philomath, Shitty Photographer, Technologist, believes the oxford comma isn't optional.
TL;DR
A sql query to list the size of database tables on a mysql server.
1SELECT concat( table_schema, '.', table_name ) table_name,
2 concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length,
3 concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length,
4 β¦