Posted over 5 years ago. Visible to the public.

MySQL / MariaDB: Show disk usage of tables and columns

You can find out about disk space usage of all tables within your database by running this:

Copy
SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)` FROM information_schema.TABLES WHERE table_schema = "$your_database";

Replace $your_database here.

To find out the disk usage of a single column:

Copy
SELECT sum(char_length($your_column))/1024/1024 FROM $your_table

Result is in megabytes again.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Thomas Eisenbarth
Last edit:
over 5 years ago
by Thomas Eisenbarth
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Eisenbarth to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more