Reputation: 21496
I'm trying to identify which tables in our schema see the heaviest insert/update load.
Is there a way to easily count the number of inserts/updates that have been issued on a specific table within a specific time range?
Upvotes: 2
Views: 541
Reputation: 247270
You can use pg_stat_user_tables
for that.
Use pg_stat_reset()
to reset the statistics, then wait a while.
The columns starting with n_
will tell you which tables receive the most writes.
Upvotes: 1