Re: Proposal: Track last-used timestamp for index usage - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: Proposal: Track last-used timestamp for index usage
Date
Msg-id CAA5RZ0vZ2d57-4SMd_fVyvCp05XL6eY+aWNEB2KVuAzbGp1_Hg@mail.gmail.com
Whole thread
In response to Proposal: Track last-used timestamp for index usage  (Raghav Mittal <mittalr086@gmail.com>)
List pgsql-hackers
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)



pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: Refactor query normalization into core query jumbling
Next
From: Fujii Masao
Date:
Subject: Re: Avoid multiple SetLatch() calls in procsignal_sigusr1_handler()