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 1rIppa-00AbPm-Ts for pgsql-admin@arkaria.postgresql.org; Thu, 28 Dec 2023 12:49:47 +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 1rIppZ-00Fviw-B1 for pgsql-admin@arkaria.postgresql.org; Thu, 28 Dec 2023 12:49:45 +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 1rIppY-00Fvio-V7 for pgsql-admin@lists.postgresql.org; Thu, 28 Dec 2023 12:49:45 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIppW-00CbJt-4B for pgsql-admin@lists.postgresql.org; Thu, 28 Dec 2023 12:49:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Reply-To:Message-ID:Subject:Cc:To:Sender:From:Date:Content-ID: Content-Description; bh=OMDdpF13Mc4WxNqo6Zgjcad6HQfb4KUAigACv0p34l8=; b=TP9ee 2lpFoKzQv3XAJY1HFnmttBgDGzKf+8JFQah8TyRNoaJDWVVJyulSA9hqaWwKsFRfwWhFkjexyzHzo MgRwEkrlRIJOFz4gF4BC+TYywNh8gUkhlO6T94SaFuILfrZdPIKo3IyZfVGzjsDBPpe+8YBIeZ8Dj jedaAsMiEvsI=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1rIppT-005P6t-0h; Thu, 28 Dec 2023 13:49:39 +0100 Date: Thu, 28 Dec 2023 13:49:39 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: "Wilson, Maria Louise (LARC-E301)[RSES]" Cc: "pgsql-admin@lists.postgresql.org" Subject: Re: Need help with slow query - postgres 12 on linux RHEL 8 Message-ID: Reply-To: depesz@depesz.com References: <902F274D-3E26-4D7C-BF7F-07536C3857E6@nasa.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <902F274D-3E26-4D7C-BF7F-07536C3857E6@nasa.gov> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 27, 2023 at 09:40:41PM +0000, Wilson, Maria Louise (LARC-E301)[RSES] wrote: > Hello folks! > > I am having a complex query slowing over time increasing in duration. > If anyone has a few cycles that they could lend a hand or just point > me in the right direction with this – I would surely appreciate it! > Fairly beefy Linux server with Postgres 12 (latest) – this particular > query has been getting slower over time & seemingly slowing everything > else down. The server is dedicated entirely to this particular > database. Let me know if I can provide any additional information!! > Thanks in advance! Hi, we'd need `explain (analyze, buffers) select ...` for your query. Ideally, could you put it on https://explain.depesz.com/, with query and `\d`, and provide us with link? Best regards, depesz