-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.sql
More file actions
7 lines (4 loc) · 721 Bytes
/
Copy pathstats.sql
File metadata and controls
7 lines (4 loc) · 721 Bytes
1
2
3
4
5
6
7
select avg(count) from (select count(1) as count,table_name from information_schema.columns where table_schema='public' and table_name in (select tablename from pg_tables where tableowner!='myuser')group by table_name) as t;
select avg(n_live_tup) from pg_stat_user_tables where schemaname='public' and relname in (select tablename from pg_tables where tableowner='yguo');
select avg(count) from (select count(1) as count,table_name from information_schema.columns where table_schema='public' and table_name in (select tablename from pg_tables where tableowner='yguo')group by table_name) as t;
select avg(n_live_tup) from pg_stat_user_tables where relname in (select tablename from pg_tables where tableowner='yguo');