Index statistics

There are a parallel set of statistics to the table ones that break down activity for each individual index. pg_stat_user_indexes also has system/all versions available, and it gives information about how many index scans were done and the rows returned by them.

The naming of the fields in this view are more complicated to distinguish among though. Two fields that look similar are subtly different:

  • idx_tup_read: "number of index entries returned by index scans".
  • idx_tup_fetch: "number of live table rows fetched by simple index scans using that index". This number will often be a bit smaller than the idx_tup_read value because it won't include dead or not yet committed rows in its count. In addition, the use of "simple" here means ...

Get PostgreSQL 9.0 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.