Skip to content

Largest indexes#

What it does

Selects user indexes by estimated pages, then reports their on-disk sizes.

$ pgcue run storage.largest_indexes

Use when

  • Index storage is growing or dominates a database's footprint.
  • Prioritizing large indexes for usage and duplication review.

Inspect

  • Large indexes with low scan counts over a representative statistics period.
  • Large indexes that overlap entries reported by duplicate-index checks.

Result

Point-in-time measurement at execution time.

Columns#

Column Meaning
index_name Index represented by the row.
index_scans Index scans initiated since statistics were reset.
index_size Human-readable on-disk index size.
index_size_bytes On-disk index size in bytes.
schema_name Schema containing the index.
table_name Table indexed by the index.

Parameters#

Option Type Default Description
--limit integer, minimum 1, accepts NULL 20 Maximum number of indexes to show. Use NULL for no limit.

Compatibility#

  • PostgreSQL 14+