Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOhhN-00088A-CQ for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 04:27:09 +0000 Received: from news.hub.org ([200.46.204.72]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TOhhI-00015l-8f for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 04:27:09 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.5/8.14.5) with ESMTP id q9I4R1n5083871 for ; Thu, 18 Oct 2012 01:27:01 -0300 (ADT) (envelope-from news@news.hub.org) Received: from news.hub.org (news@localhost) by news.hub.org (8.14.5/8.14.5/Submit) with NNTP id q9I4GX0R077724 for pgsql-jdbc@postgresql.org; Thu, 18 Oct 2012 01:16:33 -0300 (ADT) (envelope-from news) Received: by 10.224.39.75 with SMTP id f11mr2315771qae.0.1350533792356; Wed, 17 Oct 2012 21:16:32 -0700 (PDT) Received: by 10.52.34.205 with SMTP id b13mr3419867vdj.3.1350533792331; Wed, 17 Oct 2012 21:16:32 -0700 (PDT) X-Newsgroups: pgsql.interfaces.jdbc Date: Wed, 17 Oct 2012 21:16:32 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=187.38.136.124; posting-account=tXQTTAoAAABSQON-pQgHxc6VqzzjB30Y References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Severe performance degradation when using the 9.2-1000 JDBC 4 driver From: =?ISO-8859-1?Q?S=E9rgio_Saquetim?= Cc: Rafael dos Santos Silva Injection-Date: Thu, 18 Oct 2012 04:16:32 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable To: pgsql-jdbc@postgresql.org X-Pg-Spam-Score: -0.4 (/) X-Archive-Number: 201210/75 X-Sequence-Number: 23399 I can confirm the problem, it's taking about 4000ms to get a Connection. I = did a simple Java class to test that: /* * JavaApplication1.java *=20 * Criado em Oct 18, 2012, 12:40:56 AM *=20 * Copyright(c) 2012 S=E9rgio Ernesto Diniz Saquetim. Todos os direitos res= ervados. */ package javaapplication1; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * [Insira a descri=E7=E3o da classe aqui] * * @author S=E9rgio Saquetim * @version 0.1 * @since 0.1 */ public class JavaApplication1 { /** * Fun=E7=E3o de entrada de execu=E7=E3o do programa. * * @param args os argumentos da linha de comando */ public static void main(String[] args) throws ClassNotFoundException, SQL= Exception { Class.forName("org.postgresql.Driver"); String url =3D "jdbc:postgresql://192.168.1.100/frames?user=3Dpostgres&= password=3Dpostgres@mac"; long time =3D System.currentTimeMillis(); try (Connection conn =3D DriverManager.getConnection(url)) { System.out.println("Elapsed Time: "+(System.currentTimeMillis()-time)= ); try (PreparedStatement pst =3D conn.prepareStatement("SELECT version(= );")) { try (ResultSet rs =3D pst.executeQuery()) { while (rs.next()) { System.out.println(rs.getString(1)); } } } } } } The result using the : 9.2-1000 JDBC 4 run: Elapsed Time: 5172 PostgreSQL 9.2.1 on x86_64-apple-darwin, compiled by i686-apple-darwin11-ll= vm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.= 00), 64-bit Now using the 9.1-903 JDBC 4: Elapsed Time: 50 PostgreSQL 9.2.1 on x86_64-apple-darwin, compiled by i686-apple-darwin11-ll= vm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.= 00), 64-bit I'm getting the same results in my company what makes this Driver unusable = in production. Is there any workaround? Will I get to much trouble if I use= 9.1-903 JDBC 4 version driver with Postgres 9.2? Thanks a lot! Em sexta-feira, 5 de outubro de 2012 16h27min21s UTC-3, "emergency.shower@g= mail.com" escreveu: > Hi, >=20 >=20 >=20 > after the upgrade the latest PortgreSQL 9.2-1000 JDBC 4 driver, we >=20 > discovered a severe performance degradation when connecting to 8.4, >=20 > 9.0, 9.1, and 9.2 servers. In a test application the >=20 > DriverManager#getConnection(String, String, String) call constantly >=20 > took > 4500 ms compared to < 20 ms with the previous 9.1-903 JDBC 4 >=20 > driver. This makes the driver virtually unusable in production >=20 > environments. >=20 >=20 >=20 > Client: Windows 2008 R2, Windows 7 >=20 > Server: PostgreSQL 8.4, 9.0, 9.1, 9.2 on Linux 2.6 >=20 >=20 >=20 > Regards, >=20 > Alex >=20 >=20 >=20 >=20 >=20 > --=20 >=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) >=20 > To make changes to your subscription: >=20 > http://www.postgresql.org/mailpref/pgsql-jdbc