Created
August 13, 2014 02:27
-
-
Save yujihamaguchi/b817e518117c63c73d8a to your computer and use it in GitHub Desktop.
[Redshift] 列ごとの容量確認
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- refer: http://dev.classmethod.jp/cloud/aws/amazon-redshift-tutorial-tuning-table-design/ | |
-- システム生成の列を除外する為にWHERE句にcol < 6がある | |
select col, max(blocknum) | |
from stv_blocklist b, stv_tbl_perm p | |
where (b.tbl=p.id) and name ='<table name>' | |
and col < 6 | |
group by name, col | |
order by col; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment