Hi,
> I’ve been exploring index usage statistics in PostgreSQL and noticed that
> pg_stat_user_indexes only provides cumulative counters (idx_scan), but not
> recency information.
pg_stat_user_indexes.last_idx_scan and pg_stat_all_tableslast_seq_scan have been
around since v16. See [1]
Is that what you are looking for?
[1] [https://www.postgresql.org/docs/devel/monitoring-stats.html#MONITORING-PG-STAT-ALL-INDEXES-VIEW]
--
Sami Imseih
Amazon Web Services (AWS)