pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Konstantinos Kougios <kostas.kougios@googlemail.com>
To: pgsql-jdbc@postgresql.org
Subject: 42.0.0.jre7, driver logging takes 30-40% of my server's time
Date: Wed, 22 Mar 2017 17:13:28 +0000
Message-ID: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

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



view thread (12+ messages)  latest in thread

Message-ID: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com>
Permalink:  ../4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com/
Also on:    postgresql.org/message-id/4195bb97-c924-8e19-9475-6c05a934afd0@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
  Subject: Re: 42.0.0.jre7, driver logging takes 30-40% of my server's time
  In-Reply-To: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com>
  References: <4195bb97-c924-8e19-9475-6c05a934afd0@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