Get the row count for every table in a database


SELECT 
		schemaname AS "Schema",
		relname AS "Table",
		n_live_tup AS "Rows"
  	FROM 
  		pg_stat_user_tables 
  	ORDER BY 
		relname;

source

Tags:  postgresql

Share: