Skip to content

Instantly share code, notes, and snippets.

@vanbrands
Created May 15, 2019 14:32
Show Gist options
  • Save vanbrands/3a69e59eb37d09896667388fee211a7e to your computer and use it in GitHub Desktop.
Save vanbrands/3a69e59eb37d09896667388fee211a7e to your computer and use it in GitHub Desktop.
[Redshift Management] #admin
select tab.table_schema,
tab.table_name,
tinf.tbl_rows as rows
from svv_tables tab
join svv_table_info tinf
on tab.table_schema = tinf.schema
and tab.table_name = tinf.table
where tab.table_type = 'BASE TABLE'
and tab.table_schema not in('pg_catalog','information_schema')
and tinf.tbl_rows > 1
order by tinf.tbl_rows desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment