Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Qii-0000Vn-6Q for pgsql-performance@arkaria.postgresql.org; Tue, 27 Jul 2021 17:18:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m8Qih-0006rY-6K for pgsql-performance@arkaria.postgresql.org; Tue, 27 Jul 2021 17:18:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Qig-0006Sh-N8 for pgsql-performance@lists.postgresql.org; Tue, 27 Jul 2021 17:18:18 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8Qie-0005aq-FD for pgsql-performance@lists.postgresql.org; Tue, 27 Jul 2021 17:18:17 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1m8Qid-0003Ti-Tv; Tue, 27 Jul 2021 13:18:15 -0400 Date: Tue, 27 Jul 2021 13:18:15 -0400 From: Bruce Momjian To: kenny a Cc: pgsql-performance@lists.postgresql.org Subject: Re: Query performance ! Message-ID: <20210727171815.GA19767@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 27, 2021 at 10:44:03PM +0530, kenny a wrote: > Hi Experts, > > The attached query is performing slow, this needs to be optimized to > improve the performance. > > Could you help me with query rewrite (or) on new indexes to be created to > improve the performance? > > Thanks a ton in advance for your support.  Uh, there is no query, and I think you should read this: https://wiki.postgresql.org/wiki/Slow_Query_Questions -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.