Re: Vacuumdb on a table

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Murthy Nunna <mnunna(at)fnal(dot)gov>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Vacuumdb on a table
Date: 2023-10-19 04:38:36
Message-ID: 656F86ED-DB7D-4D9D-A94E-FC20C84B53EA@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Oct 18, 2023, at 10:31 PM, Keith <keith(at)keithf4(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tomek 2023-10-19 08:02:39 Re: Vacuumdb on a table
Previous Message Rajesh Kumar 2023-10-19 04:32:44 Cluster creation in Openshift container