Query below returns tables in a database with space they use ordered from the ones using most.
SELECT schema as table_schema, "table" as table_name, size as used_mb FROM svv_table_info d order by size desc;
- table_schema - name of schema
- table_name - name of table
- used_mb - size of the table, in 1 MB data blocks.
- One row represents one table in a database
- Scope of rows: all tables in a database
- Ordered by table size, from largest to smallest