Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erRyo-0001Dd-4Q for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 17:26:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erRym-00045A-Lp for pgsql-general@arkaria.postgresql.org; Thu, 01 Mar 2018 17:26:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erRym-000450-Cu for pgsql-general@lists.postgresql.org; Thu, 01 Mar 2018 17:26:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erRyf-000669-Ko for pgsql-general@postgresql.org; Thu, 01 Mar 2018 17:26:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w21HQhdg018984; Thu, 1 Mar 2018 12:26:43 -0500 From: Tom Lane To: Vikas Sharma cc: "David G. Johnston" , pgsql-general Subject: Re: Posgresql Log: lots of parse statements In-reply-to: References: Comments: In-reply-to Vikas Sharma message dated "Thu, 01 Mar 2018 17:21:20 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18982.1519925203.1@sss.pgh.pa.us> Date: Thu, 01 Mar 2018 12:26:43 -0500 Message-ID: <18983.1519925203@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Vikas Sharma writes: > But why are there so many parse statement occurances for one query? A "parse" log entry is recorded when the client sends a Parse protocol message. So the answer to that question needs to be sought in your client application's logic. > In the log I can see these parse statement occurances about 400 times in a > day and everytime taking longer than 15 secs. That seems like a mighty long time for parse analysis. Maybe you're having difficulties with something taking exclusive locks, thereby blocking other queries? regards, tom lane