Getting MySQL Table Sizes

SELECT table_name table_name,
engine,
ROUND(data_length/1024/1024,2) total_size_mb,
table_rows
FROM information_schema.tables
WHERE table_schema = ‘?????’
ORDER BY 3 desc

Advertisements
Getting MySQL Table Sizes

One thought on “Getting MySQL Table Sizes

  1. a suggestion … add: ROUND(index_length/1024/1024,2) total_index_size_mb to my list of columns … helps understand what tables are using most disk for indexes too.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s