20 October 2018 · victor ·       Add to Favorites   Report

Find the space consumed by a table / schema in Snowflake

We can use the information schema to find the space consumed by a table in Snowflake.

To find the space consumed (GB) per schema:

select table_schema,(sum(bytes)*1024*1024*1024) as Space_GB
from mydatabase.information_schema.tables
group by table_schema;

To find the tablewise space consumption:

select table_schema,table_name,(sum(bytes)*1024*1024*1024) as Space_GB
from mydatabase.information_schema.tables
group by table_schema,table_name;

victor

posted on 20 October 2018

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied