PG统计Schema下的所有表数据行数

SELECT relname,reltuples::bigint AS row_count
FROM pg_class
WHERE relname in (SELECT table_name FROM information_schema.tables WHERE table_schema = 'wangshn2305' order by "table_name")
ORDER BY row_count DESC;

posted @ 2023-07-06 16:59  小清澈  阅读(25)  评论(0编辑  收藏  举报