> On Oct 18, 2023, at 10:31 PM, Keith <keith@keithf4.com> wrote:
>
> Check pg_stat_activity or pg_locks to see if there are any open transactions or locks on the table in question.
pg_stat_statements is good too
write a couple of queries to find:
- queries run most often
- queries that are slowest
- queries that are most executions x time
the first one is good for finding badly-behaved applications or scripts; the others can point out need for indexes