瘦身
大表
SELECT sys_relation_size(oid)/1024/1024||'MB' as relsize,relname
FROM sys_class
WHERE relkind='r'
ORDER BY sys_relation_size(oid) DESC LIMIT 5;
索引
SELECT indexrelid::regclass,indrelid::regclass
FROM sys_index
WHERE indisvalid=false;
慢查询
索引
concurrently
set maintenance_work_mem='512MB';
长事务
垃圾回收
index bloat
reindex
vacuum ful