sql DBのサイズを调べる

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql DBのサイズを调べる相关的知识,希望对你有一定的参考价值。

ELECT pgn.nspname, relname, pg_size_pretty(relpages::bigint * 8 * 1024) AS size, CASE WHEN relkind = 
't' THEN (SELECT pgd.relname FROM pg_class pgd WHERE pgd.reltoastrelid = pg.oid) WHEN nspname = 
'pg_toast' AND relkind = 'i' THEN (SELECT pgt.relname FROM pg_class pgt WHERE SUBSTRING(pgt.relname 
FROM 10) = REPLACE(SUBSTRING(pg.relname FROM 10), '_index', '')) ELSE (SELECT pgc.relname FROM 
pg_class pgc WHERE pg.reltoastrelid = pgc.oid) END::varchar AS refrelname, CASE WHEN nspname = 
'pg_toast' AND relkind = 'i' THEN (SELECT pgts.relname FROM pg_class pgts WHERE pgts.reltoastrelid = 
(SELECT pgt.oid FROM pg_class pgt WHERE SUBSTRING(pgt.relname FROM 10) = REPLACE(SUBSTRING(pg.relname 
FROM 10), '_index', ''))) END AS relidxrefrelname, relfilenode, relkind, reltuples::bigint, relpages 
FROM pg_class pg, pg_namespace pgn WHERE pg.relnamespace = pgn.oid AND pgn.nspname NOT IN 
('information_schema', 'pg_catalog') ORDER BY relpages DESC; 

以上是关于sql DBのサイズを调べる的主要内容,如果未能解决你的问题,请参考以下文章

sql SQLServer的のTransactionLogのサイズを确认するコマンド

markdown 查看ポートのサイズを取得する

css Bootstrap Containerのサイズをカスタムする方法[改订版]

sql DBサイズをMB単位で一覧に

sql SQLServer的のDBのトランザクションログの拡张履歴を调べるSQLファイル

sql [SQLServer]バージョンを调べる