Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtKpC-00BzrY-2g for pgsql-admin@arkaria.postgresql.org; Thu, 19 Oct 2023 04:39:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtKp9-00DFbY-Ib for pgsql-admin@arkaria.postgresql.org; Thu, 19 Oct 2023 04:39:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtKp9-00DFae-1z for pgsql-admin@lists.postgresql.org; Thu, 19 Oct 2023 04:39:55 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtKp4-001CNm-Mp for pgsql-admin@postgresql.org; Thu, 19 Oct 2023 04:39:54 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id B459263E02; Thu, 19 Oct 2023 04:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1697690327; bh=4mAVhvl1h8C73WyFFI48reTYBdPN98MA/t3/r074A9s=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=SDspyLvIxyvVlAtmWaHHILikF+UE5frkmpePLnMsDogzFB9NoBWweWouKKFvQ1V/S p5UxpUvDzI4KnHWK+S+nK0ztmY/y/efsdhGJeEVYHk7WvTEdipQvwCxvlNY4srIE0i T6/C0imCRMN1WZXMb47qaj8+PYBZkfB99YhlvWtyFnRZsJbpsSqUENw35QVd429A6U g4Uo/wztlSY+0aqr3O1a45Ljjzi2rFOUIIvAsrg4v6um4WiUi5/8CK2bVUwyAukHGo OU464y9uNSTWtdefOZY1l7k0BxGcmQ8fPnZcrX8omH7Lv/XuE16b9aIw40qg/QQqG3 Al1GpwF90vmaA== X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PFn6k-BeHgs; Thu, 19 Oct 2023 04:38:47 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 1870063DCD; Thu, 19 Oct 2023 04:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1697690327; bh=4mAVhvl1h8C73WyFFI48reTYBdPN98MA/t3/r074A9s=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=SDspyLvIxyvVlAtmWaHHILikF+UE5frkmpePLnMsDogzFB9NoBWweWouKKFvQ1V/S p5UxpUvDzI4KnHWK+S+nK0ztmY/y/efsdhGJeEVYHk7WvTEdipQvwCxvlNY4srIE0i T6/C0imCRMN1WZXMb47qaj8+PYBZkfB99YhlvWtyFnRZsJbpsSqUENw35QVd429A6U g4Uo/wztlSY+0aqr3O1a45Ljjzi2rFOUIIvAsrg4v6um4WiUi5/8CK2bVUwyAukHGo OU464y9uNSTWtdefOZY1l7k0BxGcmQ8fPnZcrX8omH7Lv/XuE16b9aIw40qg/QQqG3 Al1GpwF90vmaA== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.100.2.1.4\)) Subject: Re: Vacuumdb on a table From: Scott Ribe In-Reply-To: Date: Wed, 18 Oct 2023 22:38:36 -0600 Cc: "pgsql-admin@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <656F86ED-DB7D-4D9D-A94E-FC20C84B53EA@elevated-dev.com> References: To: Murthy Nunna X-Mailer: Apple Mail (2.3774.100.2.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 18, 2023, at 10:31=E2=80=AFPM, Keith wrote: >=20 > 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