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

Date: 2019-08-07

Tags:  postgresql

Share: