Re: Posgresql Log: lots of parse statements

2018-03-01 Thread David G. Johnston
On Thursday, March 1, 2018, Vikas Sharma 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

Re: Posgresql Log: lots of parse statements

2018-03-01 Thread Tom Lane
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 sta

Re: Posgresql Log: lots of parse statements

2018-03-01 Thread Vikas Sharma
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 s

Re: Posgresql Log: lots of parse statements

2018-03-01 Thread David G. Johnston
On Thu, Mar 1, 2018 at 8:23 AM, Vikas Sharma wrote: > Hi All, > > I need help to understand this please. I was looking to do performance > tuning on slow queries so have stated logging queries taking more than 15 > secs. In the postgresql log I can see a query which appears only as > "parse" whi

Posgresql Log: lots of parse statements

2018-03-01 Thread Vikas Sharma
Hi All, I need help to understand this please. I was looking to do performance tuning on slow queries so have stated logging queries taking more than 15 secs. In the postgresql log I can see a query which appears only as "parse" while others appear as execute. 2018-01-21 14:01:16 GMT LOG: durat