pg_stat_user_indexes

A statistics view showing statistics about accesses to each user table index in the current database

pg_stat_user_indexes is a statistics view showing statistics about accesses to each user table index in the current database.

pg_stat_user_indexes was added in PostgreSQL 7.2 (commit 8d80b0d9).

Definition by PostgreSQL version

pg_stat_user_indexes (PostgreSQL 13)

         View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Collation | Nullable | Default
---------------+--------+-----------+----------+---------
 relid         | oid    |           |          |
 indexrelid    | oid    |           |          |
 schemaname    | name   |           |          |
 relname       | name   |           |          |
 indexrelname  | name   |           |          |
 idx_scan      | bigint |           |          |
 idx_tup_read  | bigint |           |          |
 idx_tup_fetch | bigint |           |          |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 12)

         View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Collation | Nullable | Default
---------------+--------+-----------+----------+---------
 relid         | oid    |           |          |
 indexrelid    | oid    |           |          |
 schemaname    | name   |           |          |
 relname       | name   |           |          |
 indexrelname  | name   |           |          |
 idx_scan      | bigint |           |          |
 idx_tup_read  | bigint |           |          |
 idx_tup_fetch | bigint |           |          |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 11)

         View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Collation | Nullable | Default
---------------+--------+-----------+----------+---------
 relid         | oid    |           |          |
 indexrelid    | oid    |           |          |
 schemaname    | name   |           |          |
 relname       | name   |           |          |
 indexrelname  | name   |           |          |
 idx_scan      | bigint |           |          |
 idx_tup_read  | bigint |           |          |
 idx_tup_fetch | bigint |           |          |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 10)

         View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Collation | Nullable | Default
---------------+--------+-----------+----------+---------
 relid         | oid    |           |          |
 indexrelid    | oid    |           |          |
 schemaname    | name   |           |          |
 relname       | name   |           |          |
 indexrelname  | name   |           |          |
 idx_scan      | bigint |           |          |
 idx_tup_read  | bigint |           |          |
 idx_tup_fetch | bigint |           |          |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.6)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.5)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.4)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.3)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.2)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.1)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 9.0)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 8.4)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
View definition:
 SELECT pg_stat_all_indexes.relid, pg_stat_all_indexes.indexrelid, pg_stat_all_indexes.schemaname, pg_stat_all_indexes.relname, pg_stat_all_indexes.indexrelname, pg_stat_all_indexes.idx_scan, pg_stat_all_indexes.idx_tup_read, pg_stat_all_indexes.idx_tup_fetch
   FROM pg_stat_all_indexes
  WHERE (pg_stat_all_indexes.schemaname <> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name])) AND pg_stat_all_indexes.schemaname !~ '^pg_toast'::text;
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 8.3)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
View definition:
 SELECT pg_stat_all_indexes.relid, pg_stat_all_indexes.indexrelid, pg_stat_all_indexes.schemaname, pg_stat_all_indexes.relname, pg_stat_all_indexes.indexrelname, pg_stat_all_indexes.idx_scan, pg_stat_all_indexes.idx_tup_read, pg_stat_all_indexes.idx_tup_fetch
   FROM pg_stat_all_indexes
  WHERE (pg_stat_all_indexes.schemaname <> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name])) AND pg_stat_all_indexes.schemaname !~ '^pg_toast'::text;
    

Documentation: pg_stat_user_indexes

pg_stat_user_indexes (PostgreSQL 8.2)

View "pg_catalog.pg_stat_user_indexes"
    Column     |  Type  | Modifiers
---------------+--------+-----------
 relid         | oid    |
 indexrelid    | oid    |
 schemaname    | name   |
 relname       | name   |
 indexrelname  | name   |
 idx_scan      | bigint |
 idx_tup_read  | bigint |
 idx_tup_fetch | bigint |
View definition:
 SELECT pg_stat_all_indexes.relid, pg_stat_all_indexes.indexrelid, pg_stat_all_indexes.schemaname, pg_stat_all_indexes.relname, pg_stat_all_indexes.indexrelname, pg_stat_all_indexes.idx_scan, pg_stat_all_indexes.idx_tup_read, pg_stat_all_indexes.idx_tup_fetch
   FROM pg_stat_all_indexes
  WHERE pg_stat_all_indexes.schemaname <> ALL (ARRAY['pg_catalog'::name, 'pg_toast'::name, 'information_schema'::name]);
    

Documentation: pg_stat_user_indexes

Change history

Categories

Statistics / monitoring view

See also

pg_stat_all_indexes, pg_stat_sys_indexes, pg_statio_all_indexes, pg_statio_sys_indexes, pg_statio_user_indexes