# HG changeset patch # User Oleksandr Gavenko # Date 1631529335 -10800 # Node ID ead0982db6525c6923baa7f4721a3344db923055 # Parent cdc491306fef9a66d6d33f55f17f46481893ace7 All tables row count. diff -r cdc491306fef -r ead0982db652 postgres.rst --- a/postgres.rst Tue Jun 08 17:06:25 2021 +0300 +++ b/postgres.rst Mon Sep 13 13:35:35 2021 +0300 @@ -441,6 +441,12 @@ \d+ +All tables row count:: + + SELECT relname, n_live_tup FROM pg_stat_user_tables + WHERE schemaname = 'public' + ORDER BY n_live_tup DESC; + Table total size (with indexes):: SELECT pg_size_pretty(pg_total_relation_size('schemaname.tablename'));