How to get the row count of all tables in Redshift

Run the below query to obtain the row count of all tables in Redshift database

select t1.table_schema, t1.table_name, t2.tbl_rows  
from svv_tables t1, svv_table_info t2 
where t1.table_schema = t2.schema 
and t1.table_name = t2.table 
and t1.table_schema not in('pg_catalog','information_schema')
and t1.table_type = 'BASE TABLE'
order by 3 desc;
See also  How to list all external Schemas in Redshift database