Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKl2h-0004nm-BE for pgsql-performance@arkaria.postgresql.org; Mon, 21 May 2018 13:40:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fKl2d-0006mx-J4 for pgsql-performance@arkaria.postgresql.org; Mon, 21 May 2018 13:39:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fKl2d-0006mn-8S for pgsql-performance@lists.postgresql.org; Mon, 21 May 2018 13:39:59 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fKl2a-0003gh-JZ for pgsql-performance@postgresql.org; Mon, 21 May 2018 13:39:58 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 7F966D0E3A64 for ; Mon, 21 May 2018 06:39:55 -0700 (MST) Date: Mon, 21 May 2018 06:39:55 -0700 (MST) From: pavan95 To: pgsql-performance@postgresql.org Message-ID: <1526909995520-0.post@n3.nabble.com> In-Reply-To: <1526902087.12183.0@homie.mail.dreamhost.com> References: <1526883356469-0.post@n3.nabble.com> <1526889830358-0.post@n3.nabble.com> <1526901200599-0.post@n3.nabble.com> <1526902087.12183.0@homie.mail.dreamhost.com> Subject: Re: Help me in reducing the CPU cost for the high cost query below, as it is hitting production seriously!! MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Abbas, Thanks for your valuable suggestions. To my surprise I got the same output as what I have executed before. But unfortunately I'm unable to understand the logic of the code, in specific what is base 60 number? The used data type for "effort_hours" column is 'double precision'. Kindly help me in understanding the logic. Thanks in advance. Regards, Pavan -- Sent from: http://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html