pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Konstantinos Kougios <kostas.kougios@googlemail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Jorge Solórzano <jorsol@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: 42.0.0.jre7, driver logging takes 30-40% of my server's time
Date: Wed, 22 Mar 2017 17:34:53 +0000
Message-ID: <b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com> (raw)
In-Reply-To: <CADK3HHLNnOoPWhdeQa_DYctdK=2rL25d5BFc8PH8pGLSv-Ja8w@mail.gmail.com>
References: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com>
	<CA+cVU8PF+Xejayw+q7nekSFwvKF2hPiFZ36bG1-Hg5SSr2bNsg@mail.gmail.com>
	<10ae419f-d4b1-4b03-4a73-4403c2b8b519@googlemail.com>
	<CADK3HHLNnOoPWhdeQa_DYctdK=2rL25d5BFc8PH8pGLSv-Ja8w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

It continues. It must be a misconfig of logback+common logging

On 22/03/17 17:32, Dave Cramer wrote:
> I'm confused when you say it passes this, does it return or continue 
> after this if statement ?
>
> Dave Cramer
>
> davec@postgresintl.com <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com;
>
> On 22 March 2017 at 13:24, Konstantinos Kougios 
> <kostas.kougios@googlemail.com <mailto: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
>>     <mailto: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
>>         <mailto:pgsql-jdbc@postgresql.org>)
>>         To make changes to your subscription:
>>         http://www.postgresql.org/mailpref/pgsql-jdbc
>>         <http://www.postgresql.org/mailpref/pgsql-jdbc;
>>
>>
>
>

view thread (12+ messages)  latest in thread

Message-ID: <b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com>
Permalink:  ../b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com/
Also on:    postgresql.org/message-id/b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: kostas.kougios@googlemail.com, pg@fastcrypt.com, jorsol@gmail.com
  Subject: Re: 42.0.0.jre7, driver logging takes 30-40% of my server's time
  In-Reply-To: <b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com>
  References: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com> <CA+cVU8PF+Xejayw+q7nekSFwvKF2hPiFZ36bG1-Hg5SSr2bNsg@mail.gmail.com> <10ae419f-d4b1-4b03-4a73-4403c2b8b519@googlemail.com> <CADK3HHLNnOoPWhdeQa_DYctdK=2rL25d5BFc8PH8pGLSv-Ja8w@mail.gmail.com> <b8d59020-b141-8c72-4446-c35aeeddb32f@googlemail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox