Skip to content

Instantly share code, notes, and snippets.

@ericjsilva
Created May 18, 2018 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericjsilva/5bdfb42ec256d38ea268d3c093c35e7b to your computer and use it in GitHub Desktop.
Save ericjsilva/5bdfb42ec256d38ea268d3c093c35e7b to your computer and use it in GitHub Desktop.
Query Free Space in Redshift
SELECT
SUM(capacity) / 1024 as capacity_gbytes,
SUM(used) / 1024 as used_gbytes,
(SUM(capacity) - SUM(used)) / 1024 as free_gbytes
FROM
stv_partitions WHERE part_begin = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment