From: ChatPristi <cchristo_0899@yahoo.fr>
To: List <pgsql-jdbc@postgresql.org>
Subject: Re: Slow performance with 9.3-110x JDBC 4
Date: Fri, 28 Mar 2014 10:25:43 +0000 (GMT)
Message-ID: <1396002343.73991.YahooMailNeo@web28905.mail.ir2.yahoo.com> (raw)
In-Reply-To: <CA+xsaB0+FTnzVf+Sn_pqVq=OjDDzgh81pHzt8R8SJaCiqPMFLg@mail.gmail.com>
References: <1395927334.64921.YahooMailNeo@web28904.mail.ir2.yahoo.com>
<CA+xsaB0N_9z3ghhHQ8xC09kbF6xvrpj8BJa7tUvHFbBg7xFDgQ@mail.gmail.com>
<BLU0-SMTP3032F9966CE1134E6757304CF670@phx.gbl>
<CADK3HHJZjvTgdXx3sfGyQERc7V9ir0k+oz0j3ejRuhQo9zR5Dw@mail.gmail.com>
<CA+xsaB0+FTnzVf+Sn_pqVq=OjDDzgh81pHzt8R8SJaCiqPMFLg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Thank you very much for your help and explanations.
Indeed, the Lachezar's recommendation (jdbc:postgresql://localhost/database?protocolVersion=2) restores the speed: 190413 ms with jdbc-9.3.1101 and postgresql 9.3.4.
As I used bytea and due to change since postgresql 9.0 for handling them (bytea_output parameter), my programs only work with jdbc-9.3.1101 (and no longer with jdbc-8.4-703).
So, I must use 9.3.1101. However, what does the sentence "I was recommending that for testing purposes only" by Lachezar means ? How to increase performance of server side prepared statements ?
Le Vendredi 28 mars 2014 10h50, Lachezar Dobrev <l.dobrev@gmail.com> a écrit :
For the record: I was recommending that for testing purposes only, to check if the reduced performance is related to protocol version (I believe there is a significant change it might).
2014-03-27 21:52 GMT+02:00 Dave Cramer <davecramer@gmail.com>:
I wanted to avoid that recommendation, but since it is out there. protocolVersion reverts to the same protocol as 8.4 uses which does not use server side prepared statements
>
>
>And I would expect it to speed up, or at least be the same as 8.4.7
>
>
>Dave
>
>
>www.credativ.ca
>
>
>
>
>On Thu, Mar 27, 2014 at 1:45 PM, Edson Richter <edsonrichter@hotmail.com> wrote:
>
>Em 27/03/2014 13:58, Lachezar Dobrev escreveu:
>>
>>You might want to do the same tests after adding ?protocolVersion=2
to the connection URL. i.e.: jdbc:postgresql://localhost/database?protocolVersion=2 2014-03-27 15:35 GMT+02:00 ChatPristi <cchristo_0899@yahoo.fr>:
>>>Dear All, I have a java program that does bulk insertions (with transactions and
PreparedStatements) in a postgresql database. I have a performance divided
between two and four when using 9.3-1100 JDBC4 and 9.3-1101 in comparison
with postgresql-8.4-703 JDBC4 independently of postgresql version. Time(ms) PG 8.4.7 9.3.4
Driver
8.4-703 193390 188379
9.3.1101 349404 344344 Does anybody else saw such a difference ? What reasons can explain it ? Another point, is that the bulk insertions are prerformed by parallel
processes and 9.3-110x JDBC4 drivers appear to scale poorly. Thanks for any help.
What to expect from "protocolVersoin=2"?
>>Speed up or down?
>>
>>Edson
>>
>>
>>--
>>
>>
>>Edson Carlos Ericksson Richter
>>Sistemas para Bibliotecas, Escolinhas Infantis
>>Projetos sob medida para sua empresa
>>Celular: (51) 9318-9766
>>(51) 8585-0796
>>"A mente que se abre a uma nova ideia jamais voltará ao seu tamanho original"
>>- Albert Einstein
>>
>
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: cchristo_0899@yahoo.fr
Subject: Re: Slow performance with 9.3-110x JDBC 4
In-Reply-To: <1396002343.73991.YahooMailNeo@web28905.mail.ir2.yahoo.com>
References: <1395927334.64921.YahooMailNeo@web28904.mail.ir2.yahoo.com> <CA+xsaB0N_9z3ghhHQ8xC09kbF6xvrpj8BJa7tUvHFbBg7xFDgQ@mail.gmail.com> <BLU0-SMTP3032F9966CE1134E6757304CF670@phx.gbl> <CADK3HHJZjvTgdXx3sfGyQERc7V9ir0k+oz0j3ejRuhQo9zR5Dw@mail.gmail.com> <CA+xsaB0+FTnzVf+Sn_pqVq=OjDDzgh81pHzt8R8SJaCiqPMFLg@mail.gmail.com> <1396002343.73991.YahooMailNeo@web28905.mail.ir2.yahoo.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