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 1t18NE-00EsIw-Gx for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 18:03:52 +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 1t18NC-007WMx-Qu for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 18:03:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t18Mi-007S2Y-3R for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 18:03:21 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t18Md-001OhH-2U for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 18:03:19 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id A0C5E138014F; Wed, 16 Oct 2024 14:03:13 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 16 Oct 2024 14:03:13 -0400 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=fm1; t=1729101793; x=1729188193; bh=Tc6EZU8GDi58MypgCLTiiLNbqp9VqASNXSVoKb9igiE=; b= clEvQD7lFNQ2kT2+Frukm/u/Wj9nTFslI1yyKkck80yoGcwcMRxb+oyYHH4yVfFz uHjZda4/j1EcpPygk9+UliTJKDubgukyvRxiOJxsYSn1tpxdY1HVO2vr05wD3v0L kNs2EynW8lj0a1QUBGqlo9gPp+OpeMVRGUlroJQtQdxtaUFrgT1vcYPRdz/EIPF0 Mq14mnfjz8kXjFNc3uXFJRWyfYCLvkU4wCHQeQZ9xvT9i+zavOm3Oh4wtQ/Qd4RY BE/exX6HuXOX40Ml4J84j20OYK59RTZ/2bHZwdbC9Gxq6F3j66M6iRFIl26sQEQ2 kBWunFtbrqUTzPYgBVcleQ== 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=fm2; t=1729101793; x= 1729188193; bh=Tc6EZU8GDi58MypgCLTiiLNbqp9VqASNXSVoKb9igiE=; b=o 5x0PioVEVQVDa/SZMrNrQlVX0B/5MzMSSLdZniz4Z5rc8FNuIj/raABwcvSELq5P jt3wzYLB+UUPMR89MK8dtab4YrhGuTkYequOKncNYbpTA5M0wtecIE0syyHUQPHq cGJrNJRXnjd+gR08aEVpvz0K5KTysA2JvDSAjJXcr2BINztCZbQCleB7TXyBaOCz 9/cQ5fVDgM58wqxCACQSsUcLbXzS3dFFfOkacX7+SxoFx0aHC1FiTxC9nJUnrpzm U5L0tm7TLegUBrP9UmvpP3l3aVka3GCjk2uu+ybq/4pSvGz2hxIwNjba0AfttS6H 4A5laaxHNPjooShwX29CQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegledguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgg gfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgv rhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrg htthgvrhhnpeekgfehudejheejkeetjedtvdegleffkeevveetfedtkeegfeffteffueek hfdvudenucffohhmrghinhepmhihshhqlhdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhl rghvvghrrdgtohhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehlvggrrhhnvghruggrthgrsggrshgvleelsehgmhgrihhlrdgtohhmpdhr tghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Oct 2024 14:03:12 -0400 (EDT) Message-ID: <087edd0d-b657-44b9-b0f4-46953894ca36@aklaver.com> Date: Wed, 16 Oct 2024 11:03:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Query performance issue To: yudhi s , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/16/24 10:50 AM, yudhi s wrote: > Hi, > > Below question got in one discussion.Appreciate any guidance on this. > > Below is a query which is running for ~40 seconds. As it's a query which > is executed from UI , we were expecting it to finish in <~5 seconds. It > has a "IN" and a "NOT IN" subquery , from the execution path it seems > the total response time is mainly, to be sum of the "IN" and the "NOT > IN" subquery section. My thought was that both "IN" and "NOT IN" should > be executed/evaluated in parallel but not in serial fashion. > > In the execution path below , the line number marked in *bold* are the > top lines for the IN and NOT IN subquery evaluation and they are showing > "Actual time" as  Approx ~9 seconds and ~8 seconds and they seems to be > summed up and the top lines showing it to be ~19 seconds. Then onwards > it keeps on increasing with other "nested loop" joins. > > *Note*:- This query is running on a MYSQL 8.0 database. So I'm wondering > if there is any mysql list similar to Oracle list , in which i can share > this issue? > This is the Postgres list. As to your question maybe one of the forums?: https://forums.mysql.com/ In particular Performance: https://forums.mysql.com/list.php?24 -- Adrian Klaver adrian.klaver@aklaver.com