TableStorageParameters
来自 PostgreSQL Wiki
跳转到导航跳转到搜索SELECT t.schemaname, t.relname, c.reloptions,
t.n_tup_upd, t.n_tup_hot_upd,
case when n_tup_upd > 0
then ((n_tup_hot_upd::numeric/n_tup_upd::numeric)*100.0)::numeric(5,2)
else NULL
end AS hot_ratio
FROM pg_stat_all_tables t
JOIN (pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid)
ON n.nspname = t.schemaname AND c.relname = t.relname
感谢 Dimitri (dim) Fontaine 提供此方便的代码。 代码片段