Re: Posgresql Log: lots of parse statements - Mailing list pgsql-general

From David G. Johnston
Subject Re: Posgresql Log: lots of parse statements
Date
Msg-id CAKFQuwbLaXQt3fpvaehjdsCYhAd1xxNcfx7iWMVnZ-HR5j_OHQ@mail.gmail.com
Whole thread Raw
In response to Re: Posgresql Log: lots of parse statements  (Vikas Sharma <shavikas@gmail.com>)
List pgsql-general
On Thursday, March 1, 2018, Vikas Sharma <shavikas@gmail.com> wrote:
Thanks David,

But why are there so many parse statement occurances for one query? Does postgres parse the statement everytime before  execution or parse the query only first time it is loaded in memory and reuse the same parsed plan until it ages out of memory?.

In the log I can see these parse statement occurances about 400 times in a day and everytime taking longer than 15 secs.

Please don't top-post replies.

Normally "parse unnamed" happens when client interfaces execute prepared statements using parse-bind-execute protocol.  If you want to reduce the number you will need to change your application.  As for the time it takes its impossible to say without knowing more about the environment and query.

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Posgresql Log: lots of parse statements
Next
From: Melvin Davidson
Date:
Subject: Re: Version upgrade: is restoring the postgres database needed?