Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xw83L-0002sC-Nd for pgsql-jdbc@arkaria.postgresql.org; Wed, 03 Dec 2014 11:25:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xw83L-0004Pm-5t for pgsql-jdbc@arkaria.postgresql.org; Wed, 03 Dec 2014 11:25:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xw83K-0004Mx-1z for pgsql-jdbc@postgresql.org; Wed, 03 Dec 2014 11:25:02 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xw83G-0005TQ-Gx for pgsql-jdbc@postgresql.org; Wed, 03 Dec 2014 11:25:00 +0000 Received: from ayaki.localdomain (124-169-108-102.dyn.iinet.net.au [124.169.108.102]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0Lr24R-1YQUj72T4t-00eZvJ; Wed, 03 Dec 2014 12:24:56 +0100 Message-ID: <547EF301.3070706@2ndquadrant.com> Date: Wed, 03 Dec 2014 19:24:49 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Albe Laurenz , Guillaume Cottenceau *EXTERN* , "pgsql-jdbc@postgresql.org" Subject: Re: performance question: protocol v2 vs v3 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:qGz8+9MRSefXLFyBrm7AFzfd3yuBenYVxj8dgpCR4z2 Azx44JyPPUtCSosImrEjf9D7GMUorjCTse2x/w+c3QztxbhlzZ WImwcBTBDDcfbh9EJIcoLDwZInasK6VWocpIi47tFDZCYzmtVy IZLqwe0052Fb17BSs6zImRrQ/geVOdTuxwpmnx92QSUUM91w9a 10zn1hy4h1Ol2cchvNiGYLGZUHyzdElvVYrSkQKAdwWrpN/bhR YEGAPcWrL7PPxIvV4OMm8eFOPDu8Gn9BDsY1xV0bxY++EeXE0E WtuaJZ4z2Hcg44BPt/ttHSlHDBZN/Q9kg7BHa9euRSxf2Yau2B yIiYXxgw5CHFyQ8VClKNQ7giXUn+RX9WqekCZk1fa X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) 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 On 11/25/2014 06:45 PM, Albe Laurenz wrote: > An explanation is maybe that prepared statements are handled > using the extended query protocol, which only exists in v3. > With the extended query protocol, each statement is first parsed, > then parameters are bound to the statement and then the statement > is executed, leading to three client-server round trips. While Parse/Bind/Execute are separate steps, it is not correct to say that this means three round trips. Take a look at the conversation on the wire in Wireshark. You'll see that generally, the Parse, Bind, Describe, Execute and Sync messages are all actually sent in the same packet. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc