Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqjpm-0004MM-Hh for pgsql-jdbc@arkaria.postgresql.org; Wed, 22 Mar 2017 17:14:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cqjpm-0005M8-4l for pgsql-jdbc@arkaria.postgresql.org; Wed, 22 Mar 2017 17:14:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cqjpG-0004Om-QT for pgsql-jdbc@postgresql.org; Wed, 22 Mar 2017 17:13:34 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cqjpE-0004s3-8K for pgsql-jdbc@postgresql.org; Wed, 22 Mar 2017 17:13:33 +0000 Received: by mail-wm0-x22e.google.com with SMTP id v203so10260682wmg.0 for ; Wed, 22 Mar 2017 10:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=5SyE7uysatmVwyVlIOMFKja0O298BDHjvJLw7M+Arns=; b=focaJ35cL91CPFbe6T5JzcKqnv0CFYapk2xdanhJ2sUVUQHKrf5Kd2zOye4obcR6+W TLplYWL/6J7Vk6k/lHacUOU+VXBdTv6a+reDWf3/NHXSNSJgNEAXUyMSrRf0BOAEwpnx ggv+N1La/Tm8SnvItCURaBY6WLbMMl3u9uP7pWg0cQWej1SXgmDXgt24dLGq5ZDHYCsh TX1fBV8Q52H81L9R2X/8qbeyPql9FDzwH1qv1cIYwjaPNrSfnmxscv9j8tQpWwub1Rk4 osEO6Bj6ZkYBmUSpLcDOELZNa1jUO2jDNc7pPSyy6NHGTUlgOxw4NdlRNrM8HTqLgEVw jlrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=5SyE7uysatmVwyVlIOMFKja0O298BDHjvJLw7M+Arns=; b=Yp8GMePdPjffBAKKrpcYE9lb09YwTbmsd1J+xzL7k64scmZXdOLboSjawSLyi1FDtX NaDYKFwFqFmSKv81QM7FKzmnUxDnGl9jB4Ukr6gckKrPuN1YPYWEO0/KBfWPjlGbg2fq MPSjg6nsF8+oV6CckOdVzNJsSatOK++R6rDA246uTc0+Nu28eZ1mHPRFO9s08tBRD407 lIfH+o5cJ76rLl0u1efxOiwgR7ML9rT4TnQL2UPWN1bHohP7wC0/TuQymlpIVSo0IAPw rPeCrWo7FcXgaUUssO89ZMyHU67W9AHMLM+Etk4VmvjdWCZ3Bf7sFqQL/ZbjkMmnpZH6 UVTA== X-Gm-Message-State: AFeK/H3WRh9V4baSaqF3Ba2UBjb9esSqtp8yxPNYNZzblGGgTqKko2FguOgHQxfSkUYPjg== X-Received: by 10.28.139.134 with SMTP id n128mr8521491wmd.132.1490202809965; Wed, 22 Mar 2017 10:13:29 -0700 (PDT) Received: from ?IPv6:2a02:c7f:8219:6d00:2150:e954:8a82:94cb? ([2a02:c7f:8219:6d00:2150:e954:8a82:94cb]) by smtp.googlemail.com with ESMTPSA id 127sm1012630wmt.20.2017.03.22.10.13.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2017 10:13:29 -0700 (PDT) To: pgsql-jdbc@postgresql.org From: Konstantinos Kougios Subject: 42.0.0.jre7, driver logging takes 30-40% of my server's time Message-ID: <4195bb97-c924-8e19-9475-6c05a934afd0@googlemail.com> Date: Wed, 22 Mar 2017 17:13:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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