psql -d appdb -c "SELECT indexname, pg_size_pretty(pg_relation_size(indexrelid)) FROM pg_indexes WHERE tablename = 'users';"
Show index sizes for one table
pg_indexes joins index names to their catalog OIDs, letting pg_relation_size report each index's footprint. Spot oversized or duplicate indexes before deciding what to drop.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.