Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTUB6-0003NQ-W2 for pgsql-jdbc@arkaria.postgresql.org; Fri, 28 Mar 2014 10:38:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WTUB6-0008VD-H1 for pgsql-jdbc@arkaria.postgresql.org; Fri, 28 Mar 2014 10:38:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WTUB5-0008V7-Lh for pgsql-jdbc@postgresql.org; Fri, 28 Mar 2014 10:38:23 +0000 Received: from nm39.bullet.mail.ne1.yahoo.com ([98.138.229.32]) by magus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WTUB1-0004On-UQ for pgsql-jdbc@postgresql.org; Fri, 28 Mar 2014 10:38:23 +0000 Received: from [127.0.0.1] by nm39.bullet.mail.ne1.yahoo.com with NNFMP; 28 Mar 2014 10:38:18 -0000 Received: from [98.138.100.114] by nm39.bullet.mail.ne1.yahoo.com with NNFMP; 28 Mar 2014 10:35:34 -0000 Received: from [212.82.98.52] by tm105.bullet.mail.ne1.yahoo.com with NNFMP; 28 Mar 2014 10:35:33 -0000 Received: from [212.82.98.81] by tm5.bullet.mail.ir2.yahoo.com with NNFMP; 28 Mar 2014 10:35:33 -0000 Received: from [127.0.0.1] by omp1018.mail.ir2.yahoo.com with NNFMP; 28 Mar 2014 10:35:33 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 371705.56023.bm@omp1018.mail.ir2.yahoo.com Received: (qmail 69716 invoked by uid 60001); 28 Mar 2014 10:35:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s1024; t=1396002933; bh=pwdqATPljAcGRcyh3ycnG6iMnnmLAUZwtR5s9oWRg0Q=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=XPm0/f77O5ep8lwD/XQvf6pXpO9cs8lmliXapBU2nNWxG738weV1ZCr/6LwWQosUWBy+PzWsnNCWS4NvNH9OMNUZdaGWElnB7Kd+5ptzpTdTseg0+obaaMIzSmmXyiCyofMmZiedhdsN9AlPo/8Vi4B88KDPxjS8+OS5h29kxns= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Noy56c+i9qOABVywhjkRTvXT3MvqU2Pgyb87jyy5obFR0V13DMKhJipQWuMvG8quRAGee7tHa2xrwQYkpr/q6tzKhq8stqpYjE/+8qAWRoWITbn9lwTYVOeghxHq/6aNIVBimSPPDH7Sg3UxysiZfkuGUYWB1fAWxPKstyo90GQ=; X-YMail-OSG: ZG8BlU0VM1nmjVH53xI4Sym6cgcs1SHZsto2BaWGZVbJxN. VBnAQy0zV.8v.KH31bgWViJ7Ju33Xq.aDTFDhX524V9DuGVvUiJFKCEbJmP8 8nTDA5I.e1V7r4q.v_gvXmeFT3.jIsxGHJY0nBXuXj5wn5FtyU34Y.eTFid5 pMyfU3xnIzqs9iB7MADz.rgu3zfzMJxsohq7BZR2HighxNeMY.pcR76OxFdo bMUg_9iFYZrz7Xkx9hP8LgmxCIccG49UMn5i7tEQZcNz8mLBFcvtiLdWpNpE uWa4H3CZl4RMQtbMQavwRYGhGhdflDJtj0Hc_wDbW.rp7QH0SEOCHjMuF6HN t3GQNNSyoHenEECZA.9tYmQ5z4mKIYaPPDIie6jOK9AHhwpiJtkgUjjJmop1 tmikJnvUnDuwTAjJs_bx6bqc2AMZoAvOCe8HBHxfQYZgiQv.gyUJxrtmjudJ Q6hNs2j3NfWf0VdkVmA5WEOfQvn.DORxqdlzt5st1kIA3APzUU7bBerVvW6g qoebWcxO7ulr1SAXlIAWL6vF_C.jCRAKlmV1WwCbcjMSlA27SA1wuVM5NQ1Q KGwnNCL00LWnHGMFd4VjWV0d_BZPfDHx__BAxGFxCunHD6f.VjeiHBPvHWuB jhXmAHw-- Received: from [193.51.160.62] by web28905.mail.ir2.yahoo.com via HTTP; Fri, 28 Mar 2014 10:35:33 GMT X-Rocket-MIMEInfo: 002.001, TXkgYXBvbG9naXplLCBteSBwcmV2aW91cyB0ZXN0IHdhcyB3cm9uZy4gSXQgd2FzIG9sZCBqYXJzLiBTbyB0aGUgdGltZSBpcyBzdGlsbCBpbXByb3ZlZCBidXQgcmVtYWluIGxlc3MgdGhhbiB3aXRoIGpkYmMtOC40OiAyMjM1MjggbXMgKGpkYmMtOS4zKSB2cyAxOTA0MTMgbXMgKGpkYmMtOC40KSAuCgoKCgpMZSBWZW5kcmVkaSAyOCBtYXJzIDIwMTQgMTFoMjYsIENoYXRQcmlzdGkgPGNjaHJpc3RvXzA4OTlAeWFob28uZnI.IGEgw6ljcml0IDoKIApUaGFuayB5b3UgdmVyeSBtdWNoIGZvciB5b3VyIGhlbHABMAEBAQE- X-Mailer: YahooMailWebService/0.8.181.645 References: <1395927334.64921.YahooMailNeo@web28904.mail.ir2.yahoo.com> <1396002343.73991.YahooMailNeo@web28905.mail.ir2.yahoo.com> Message-ID: <1396002933.13280.YahooMailNeo@web28905.mail.ir2.yahoo.com> Date: Fri, 28 Mar 2014 10:35:33 +0000 (GMT) From: ChatPristi Reply-To: ChatPristi Subject: Re: Slow performance with 9.3-110x JDBC 4 To: List In-Reply-To: <1396002343.73991.YahooMailNeo@web28905.mail.ir2.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1732997280-1513070889-1396002933=:13280" X-Pg-Spam-Score: -1.5 (-) 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 ---1732997280-1513070889-1396002933=:13280 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable My apologize, my previous test was wrong. It was old jars. So the time is s= till improved but remain less than with jdbc-8.4: 223528 ms (jdbc-9.3) vs 1= 90413 ms (jdbc-8.4) .=0A=0A=0A=0A=0ALe Vendredi 28 mars 2014 11h26, ChatPri= sti a =E9crit :=0A =0AThank you very much for your= help and explanations.=0A=0AIndeed, the Lachezar's recommendation=A0 (jdbc= :postgresql://localhost/database?protocolVersion=3D2) restores the speed: 1= 90413 ms with jdbc-9.3.1101 and postgresql 9.3.4.=0A=0AAs I used bytea and = due to change since postgresql 9.0 for handling them (bytea_output paramete= r), my programs only work with=A0 jdbc-9.3.1101 (and no longer with jdbc-8.= 4-703).=0A=0ASo, I must use 9.3.1101. However, what=A0 does the sentence "I= was recommending that for testing purposes only" by Lachezar means ? How t= o increase performance of server side prepared statements ?=0A=0A=0A=0A=0A= =0ALe Vendredi 28 mars 2014 10h50, Lachezar Dobrev a = =E9crit :=0A =0A=A0 For the record: I was recommending that for testing pur= poses only, to check if the reduced performance is related to protocol vers= ion (I believe there is a significant change it might).=0A=0A=0A=0A=0A2014-= 03-27 21:52 GMT+02:00 Dave Cramer :=0A=0AI wanted to = avoid that recommendation, but since it is out there. protocolVersion rever= ts to the same protocol as 8.4 uses which does not use server side prepared= statements=0A>=0A>=0A>And I would expect it to speed up, or at least be th= e same as 8.4.7=0A>=0A>=0A>Dave=0A>=0A>=0A>www.credativ.ca=0A>=0A>=0A>=0A>= =0A>On Thu, Mar 27, 2014 at 1:45 PM, Edson Richter wrote:=0A>=0A>Em 27/03/2014 13:58, Lachezar Dobrev escreveu:=0A>>=0A>>Yo= u might want to do the same tests after adding ?protocolVersion=3D2=0Ato th= e connection URL. i.e.: jdbc:postgresql://localhost/database?protocolVersio= n=3D2 2014-03-27 15:35 GMT+02:00 ChatPristi : =0A>>= >Dear All, I have a java program that does bulk insertions (with transactio= ns and=0APreparedStatements) in a postgresql database. I have a performance= divided=0Abetween two and four when using 9.3-1100 JDBC4 and 9.3-1101 in c= omparison=0Awith postgresql-8.4-703 JDBC4 independently of postgresql versi= on. Time(ms) PG 8.4.7 9.3.4=0ADriver=0A8.4-70= 3 193390 188379=0A9.3.1101 = 349404 344344 Does anybody else saw such a difference ? Wh= at reasons can explain it ? Another point, is that the bulk insertions are = prerformed by parallel=0Aprocesses and 9.3-110x JDBC4 drivers appear to sca= le poorly. Thanks for any help. =0AWhat to expect from "protocolVersoin=3D2= "?=0A>>Speed up or down?=0A>>=0A>>Edson=0A>>=0A>>=0A>>-- =0A>>=0A>>=0A>>Eds= on Carlos Ericksson Richter =0A>>Sistemas para Bibliotecas, Escolinhas Infa= ntis=0A>>Projetos sob medida para sua empresa =0A>>Celular: (51) 9318-9766= =0A>>(51) 8585-0796 =0A>>"A mente que se abre a uma nova ideia jamais volta= r=E1 ao seu tamanho original"=0A>>- Albert Einstein =0A>>=0A> ---1732997280-1513070889-1396002933=:13280 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
My apologize, my previous test was wrong. It was o= ld jars. So the time is still improved but remain less than with jdbc-8.4: = 223528 ms ( jdbc-9.3) vs 190413 ms (<= /span> jdbc-8.4) .


Le Vendredi 28 mars 2014 11h26, ChatP= risti <cchristo_0899@yahoo.fr> a =E9crit :
Thank you v= ery much for your help and explanations.

Indeed, the Lachezar's recommendat= ion  ( jdbc:postgresql://localhost/database?protocolVers= ion=3D2) restores the speed: 190413 ms with jdbc-9.3.1101 and postgresql 9.3.4.<= /div>

As I used bytea and due to change since postgresql = 9.0 for handling them (bytea_output parameter), my programs only work with&= nbsp; jdbc-9.3.= 1101 (and no longer with jdbc-<= span class=3D"yiv3486676733">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 serve= r side prepared statements ?



Le Vendredi 28 mars 2014 10h50, Lachezar= Dobrev <l.dobrev@gmail.com> a =E9crit :
<= /div>
  For the record: I was recommend= ing 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).
=0A


2014-03-27 21:52 GMT+02= :00 Dave Cramer <davecramer@gmail.com>:
= =0A
<= blockquote class=3D"yiv3486676733gmail_quote" style=3D"margin:0 0 0 .8ex;bo= rder-left:1px #ccc solid;padding-left:1ex;">
I wanted to av= oid 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 s= tatements
=0A
And I would expect it to spe= ed up, or at least be the same as 8.4.7
=0A=0A

=
Dave



On Thu, Mar 27, 2014 at 1:45 PM, Edson Rich= ter <edsonrichter@hotmail.com> wrote:
=0A=0A=0A
=0A=0A =0A = =0A =0A
=0A
Em 27/03/2014 13:58, Lachezar Dobrev=0A esc= reveu:
=0A
=0A
=0A
  You might want to do the same tests after adding ?protocol=
Version=3D2=0Ato the connection URL.=0A  i.e.:=0A   jdbc:postgresql://local=
host/database?protocolVersion=3D2=0A=0A2014-03-27 15:35 GMT+02:00 ChatPrist=
i <cchristo_0=
899@yahoo.fr>:=0A
=0A
=0A =
Dear All,=0A=0AI have a java program that does bulk insertions (with =
transactions and=0APreparedStatements) in a postgresql database. I have a p=
erformance divided=0Abetween two and four when using 9.3-1100 JDBC4 and 9.3=
-1101 in comparison=0Awith postgresql-8.4-703 JDBC4 independently of postgr=
esql version.=0A=0A Time(ms)                PG     8.4.7            9.3.4=
=0ADriver=0A8.4-703                          193390         188379=0A9.3.11=
01                         349404         344344=0A=0ADoes anybody else saw=
 such a difference ? What reasons can explain it ?=0A=0AAnother point, is t=
hat the bulk insertions are prerformed by parallel=0Aprocesses and 9.3-110x=
 JDBC4 drivers appear to scale poorly.=0A=0AThanks for any help.=0A
= =0A
=0A
=0A    
=0A = What to expect from "protocolVersoin=3D2"?
=0A Speed u= p or down?
=0A
=0A Edson
=0A
=0A <= /font>
--
=0A
=0A =
=0A Edson Carlo= s Ericksson Richter=0A
=0A = Sistemas para Bibliotecas, Escolinhas Infantis
=0A Projetos sob medida para sua empresa
=0A =
Celular:(51) 9318-9766
=0A (51) 8585-0796
=0A "A mente que se abre = a uma nova ideia jamais voltar=E1 ao=0A seu tamanho original= "
=0A - Albert Einstein=0A
=0A
=0A
=0A =0A=0A

=0A





---1732997280-1513070889-1396002933=:13280--