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 1rezsX-00EpTN-8M for pgsql-general@arkaria.postgresql.org; Tue, 27 Feb 2024 16:00:25 +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 1rezsV-003wWy-T9 for pgsql-general@arkaria.postgresql.org; Tue, 27 Feb 2024 16:00:24 +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 1rezsV-003wWp-Io for pgsql-general@lists.postgresql.org; Tue, 27 Feb 2024 16:00:24 +0000 Received: from wfhigh3-smtp.messagingengine.com ([64.147.123.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rezsQ-001XKh-8h for pgsql-general@lists.postgresql.org; Tue, 27 Feb 2024 16:00:22 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id BB25018000B7; Tue, 27 Feb 2024 11:00:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 27 Feb 2024 11:00:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1709049617; x=1709136017; bh=cf0WoFemgNiI5GETzL2wBR+7TZrjUs/aMmKyT2J4Y3U=; b= TbKyfB5/tX9uBgIJ4prTiT2Im2xDRBDFsM7Lo1KOeiQIGKGfic4JZ8nchArXxKjf Jk8pr3KwflYQRniCKezQoLdRWQCbGfsSZAFRyeEDYR8d3+QygL60JynkUSYjI9q/ pQEDKehxK+wbH0KimB98WCYK6EPgezeOUWtHrHufOEzAsrl1cLjaq6hM4ZU0SAGL UNYysMiBSw3rVZMpevWz94VELeWos7BQGDApbcQ3nD4XM8Wte7fOf6k7zgybQ39k GHE5eD5DOhdrXniNfZ42ZF/LMqa3QS2WSN9GDNzJYT3uZ9CUjWctSqIfF+GtAksx PO0qe+bPVspYVQQWFRGsSQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1709049617; x= 1709136017; bh=cf0WoFemgNiI5GETzL2wBR+7TZrjUs/aMmKyT2J4Y3U=; b=p XdPy2hitKo+Q9daCMAjXxL3DbW3bt/YANrayxwr62mIIMQQwoBesmIIRLEoeduXT iWkKj1nvDvdAq/HsyODiloAFvwMo5R5cIMQucjORZokDxm9HroAeNKa5Q5qmDTMJ IwrdwER9fwouFTPl7Bf5qK6gmou30frVTW0Bu0B7S/yFtlFjr+kGGZHHlmlTxjZH yxTcPU99iFjmzeIk4H8CEF4M+wagDXLXvPH4I4RmVfVH8Bid7dDQYjh469L8akZl uJrA9uAuTBFTXKRinSqY1wOw/g8qVFClVq8TooXS4u2igAWp4oPypcrgyqkty9O/ My2vlLUXhbWtmiTKE6Mdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgeehgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeekfeehuddvje eigfeifeejtdduudffledvfeelheeftdeiffeugfdvkeelgedtvdenucffohhmrghinhep phhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtgho mh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Feb 2024 11:00:16 -0500 (EST) Message-ID: <2d9d2a2a-8873-4bfa-ba97-a0f77efa77dc@aklaver.com> Date: Tue, 27 Feb 2024 08:00:16 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Need help with tuning a query Content-Language: en-US To: Siraj G , pgsql-general@lists.postgresql.org References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/27/24 07:50, Siraj G wrote: > Hello All! > > Can you please assist me with highlighting the bad area in the execution > plan attached. I am kind of new to PgSQL and trying to get some help > with troubleshooting a query. > > Little background. DB was migrated from Oracle to AlloyDB. The SQL that > used to take 2 seconds is now taking around 8 - 10secs in AlloyDB. We > are trying to close this gap. Any help would be appreciated. https://wiki.postgresql.org/wiki/Slow_Query_Questions > > Regards > Siraj -- Adrian Klaver adrian.klaver@aklaver.com