Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVbzt-0000VX-1Q for pgsql-jdbc@arkaria.postgresql.org; Fri, 05 Aug 2016 10:04:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bVbzs-0001io-KP for pgsql-jdbc@arkaria.postgresql.org; Fri, 05 Aug 2016 10:04:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVbzO-0001BF-EI for pgsql-jdbc@postgresql.org; Fri, 05 Aug 2016 10:04:26 +0000 Received: from mail.mnc.ch ([62.2.77.205]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bVbzL-0008NF-GH for pgsql-jdbc@postgresql.org; Fri, 05 Aug 2016 10:04:25 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id 6A591245D; Fri, 5 Aug 2016 12:04:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at example.com Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail.op.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yWamynbF56Py; Fri, 5 Aug 2016 12:04:20 +0200 (CEST) Received: from gc.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id 4368EF56; Fri, 5 Aug 2016 12:04:20 +0200 (CEST) Received: by gc.localdomain (Postfix, from userid 500) id E429118EDDE; Fri, 5 Aug 2016 12:04:19 +0200 (CEST) To: Vladimir Sitnikov Cc: List Subject: Re: v2 protocol: is it still used? References: From: Guillaume Cottenceau X-Hashcash: 1:21:160805:sitnikov.vladimir@gmail.com::JDf7ZcEoxpZdmEMb:00000000000000000000000000000000003clk X-Hashcash: 1:21:160805:pgsql-jdbc@postgresql.org::iKgLPqrqnVV9CrOl:0000000000000000000000000000000000000cXe Date: Fri, 05 Aug 2016 12:04:19 +0200 In-Reply-To: (Vladimir Sitnikov's message of "Fri\, 05 Aug 2016 09\:39\:03 +0000") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pg-Spam-Score: -3.1 (---) 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 Hi, A few years back, I analysed the reason why some JDBC requests were slower than psql requests. It turned out that, by using prepared statement in protocol v3, the query plan is determined once and for all (IIRC, for a given PreparedStatement object), and so when reused later with other query parameters (typically, not as selective, I guess), it turned out to be much slower (suboptimal query plan). The only workaround I found back then, was to use protocol v2 (IIRC prepared statements are fully client side in protocol v2?). I noticed recently though that it's not going to be able anymore soon, because the 9.5 backend breaks on the driver passing autocommit=true anyways. Thanks > Hi, > > Does anybody still use v2 protocol via pgjdbc? > > I'm reworking QueryExecutor/ProcotolConnection implementation as a part of > "smarter returning" (https://github.com/pgjdbc/pgjdbc/issues/488), and I would > like to just drop v2 support. > > As far as I know, v3 was introduced in PostgreSQL 7.4, thus it looks rather > safe to just drop v2 support in pjgdbc. > > By the way, the oldest version we test in Travis is 8.4 > > Vladimir -- Guillaume Cottenceau -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc