20 October 2018        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;

Read great educational content like this and a lot more ! Create my free account now 🎁

Copied