Skip to content

Instantly share code, notes, and snippets.

@smalik
Created February 16, 2016 20:00
Show Gist options
  • Save smalik/c8579cface91a1a90a80 to your computer and use it in GitHub Desktop.
Save smalik/c8579cface91a1a90a80 to your computer and use it in GitHub Desktop.
SELECT anchor_table_schema,
anchor_table_name,
SUM(used_bytes) / ( 1024^3 ) AS used_compressed_gb
FROM v_monitor.column_storage
GROUP BY anchor_table_schema,
anchor_table_name
ORDER BY SUM(used_bytes) DESC;
@smalik
Copy link
Author

smalik commented Feb 16, 2016

The following query aggregates the column_storage data to the table level. You can add column_name for more granularity. Note that empty tables will not appear in this table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment