ちょくちょく使うけど毎回考えるのが面倒になったのでコピペ用メモ。 SELECT relname, relkind, to_char(reltuples, '999,999,999') as rows, to_char(pg_relation_size(relname), '999,999,999,999') as bytes FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname='public'); ↓こんな感じの出力が出来る。 relname | relkind | rows | bytes - usertrack | r | 217,425 | 18,202,624 url | r | 26,589 | 4,767,744 url_id_seq | S | 1 | 8,192 use