Query below returns tables in a database with space they use ordered from the ones using most.
select schema_name as table_schema, anchor_table_name as table_name, round(sum(used_bytes)/(1024^2), 2) as used_mb from v_monitor.storage_containers sc join v_catalog.projections p on sc.projection_id = p.projection_id group by table_schema, table_name order by used_mb desc;
- table_schema - name of table schema
- table_name - name of table
- used_mb - space used by table in MB ( by all table projections)
- One row represents one table in a database
- Scope of rows: all tables in a database
- Ordered by table size descending