Thread: Index usage statistic for last X hours

Index usage statistic for last X hours

From
otar shavadze
Date:
Hello
I need to measure  usage of an indexes in the last X hours.
One way I think, is to use pg_cron (or some similar tool) and periodically(hourly) save data from "pg_stat_all_indexes" view some custom table, and then measure usage between hours.

Is there some better solution for this?