Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server's time - Mailing list pgsql-jdbc

From Jorge Solórzano
Subject Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server's time
Date
Msg-id CA+cVU8PF+Xejayw+q7nekSFwvKF2hPiFZ36bG1-Hg5SSr2bNsg@mail.gmail.com
Whole thread Raw
In response to [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server's time  (Konstantinos Kougios <kostas.kougios@googlemail.com>)
Responses Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime  (Konstantinos Kougios <kostas.kougios@googlemail.com>)
Re: 42.0.0.jre7, driver logging takes 30-40% of my server'stime  (Konstantinos Kougios <kostas.kougios@googlemail.com>)
List pgsql-jdbc
Have you enabled the Logger with a FINEST (TRACE) level?



On Wed, Mar 22, 2017 at 11:13 AM, Konstantinos Kougios <kostas.kougios@googlemail.com> wrote:
I tried to paste an image with a profile, but my email was rejected.

It seems logging is called in places like row.getInt(), row.getString() etc without a check for the logging level. Then it takes a lot of time for those to be processed, especially for queries that get a lot of data. It goes down to parsing strings and locale and it just is slow. I see postgres processing a query for 1 sec but on the java side it takes 5 secs to get the data back to my code. Part of this slowdown is due to the logging. Can it be optimized, i.e. having a boolean to true/false if logging is enabled and then do the calls?

Thanks




--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

pgsql-jdbc by date:

Previous
From: Konstantinos Kougios
Date:
Subject: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server's time
Next
From: Konstantinos Kougios
Date:
Subject: Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime