Largest index.
--- a/postgres.rst Wed Sep 18 09:29:55 2019 +0300
+++ b/postgres.rst Thu Sep 19 09:10:33 2019 +0300
@@ -433,10 +433,19 @@
where relkind = 'i'
order by pg_relation_size(oid) desc;
+ select pg_relation_size(i.oid), t.relname as tname, i.relname as iname, *
+ from pg_class i
+ join pg_index ix on ix.indexrelid = i.oid
+ join pg_class t on t.oid = ix.indrelid
+ where i.relkind = 'i'
+ order by pg_relation_size(i.oid) desc;
+
https://www.postgresql.org/docs/9.6/functions-admin.html
Database Object Management Functions.
https://wiki.postgresql.org/wiki/Disk_Usage
- Finding the size of various object in your database.
+ Finding the size of various object in your database.
+https://wiki.postgresql.org/wiki/Index_Maintenance
+ Index size/usage statistics.
MVCC and transaction id
=======================