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

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server's time
Дата
Msg-id CADK3HHLNnOoPWhdeQa_DYctdK=2rL25d5BFc8PH8pGLSv-Ja8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime  (Konstantinos Kougios <kostas.kougios@googlemail.com>)
Ответы Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime
Re: 42.0.0.jre7, driver logging takes 30-40% of my server'stime
Список pgsql-jdbc
I'm confused when you say it passes this, does it return or continue after this if statement ?


On 22 March 2017 at 13:24, Konstantinos Kougios <kostas.kougios@googlemail.com> wrote:
I am using logback and I don't see any postgres-driver related logging, so I assume it should be off

Looking at the stacktrace of the profile though, it seems it passes this code:
if (!isLoggable(level)) {   return;
}

So it seems as if it is ON though it doesn't log anything.


On 22/03/17 17:21, Jorge Solórzano wrote:
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 по дате отправления:

Предыдущее
От: Konstantinos Kougios
Дата:
Сообщение: Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime
Следующее
От: Konstantinos Kougios
Дата:
Сообщение: Re: [JDBC] 42.0.0.jre7, driver logging takes 30-40% of my server'stime