Home

Published

- 1 min read

postgresql tables with more rows

img of postgresql tables with more rows

The solution for this is noted below

postgresql tables with more rows

Solution

   select n.nspname as table_schema,
       c.relname as table_name,
       c.reltuples as rows
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind = 'r'
      and n.nspname not in ('information_schema','pg_catalog')
order by c.reltuples desc;

Try other methods by searching on the site. That is if this doesn’t work