PostgreSQLã§ãã¼ãã«ãµã¤ãºã確èªãã
ã¡ããã¡ãã使ããã©æ¯åèããã®ãé¢åã«ãªã£ãã®ã§ã³ããç¨ã¡ã¢ã
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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
relkindã¯è¦ãã°åããã ãããã©ãr=ãã¼ãã«ãSã·ã¼ã±ã³ã¹ãi=ã¤ã³ããã¯ã¹ãv=ãã¥ã¼ãã
VACUUM ANALYZE ã¨ã REINDEX ã¨ããã¦ããå®è¡ããæ¹ãããæ£ç¢ºãªå¤ãåããã®ã§å¿ããªãã§ã(é·ææ¾ç½®ãã¦ãDBã¨ãã ã¨æ°åã¬ãã«ã®èª¤å·®ãåºãã¨ãããã)