Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zjn82-0004CA-CW for pgsql-jdbc@arkaria.postgresql.org; Wed, 07 Oct 2015 11:43:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zjn81-0008Nq-OT for pgsql-jdbc@arkaria.postgresql.org; Wed, 07 Oct 2015 11:43:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zjn81-0008Nf-9w for pgsql-jdbc@postgresql.org; Wed, 07 Oct 2015 11:43:25 +0000 Received: from mail-lb0-f174.google.com ([209.85.217.174]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zjn7y-0007Gq-Ak for pgsql-jdbc@postgresql.org; Wed, 07 Oct 2015 11:43:24 +0000 Received: by lbos8 with SMTP id s8so8174671lbo.0 for ; Wed, 07 Oct 2015 04:43:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kNvewS0GaAo9H5P/Hz2kXsm3D+cO0Mo9zildQUJYstE=; b=Lrb3oSaM1UA0tAAfZ+wttJcEN3fqdGhQeKfIB824BDEJu7699N0JlpJ3nFTiY5Vu5S YlXbOYlAzpfiycykNl5BEWngIAuqycErxlbz0lVnHkNakbxeFWg3q47k8RIC1mj4d58J Uu6+uSQ9en4RUfKiosk8CU6cuz3K8K20IP5aAUrcFQrQKQ9w6389009eD22n990DIsk2 bHHa1rOI/W7sjB0qcCOi1C/IP4m4PmdiF17jEIPew27w9der4J/JqsmKHK4MhzYUcziQ 6OWx5FFXWmZc+ihgY7CWzPpF5kUVz+L6ttL7Asa7kmr0IfRuh4ktK+0ttJ8Xgk4lU0n8 LyTQ== X-Gm-Message-State: ALoCoQmv59qd0w217k4H/bZgTGLpbIE9EVdUpD5sj3o0/aQe5ut1jdWLb4R1wMnIlnv+fqyDXnpg MIME-Version: 1.0 X-Received: by 10.112.236.3 with SMTP id uq3mr312464lbc.69.1444218200014; Wed, 07 Oct 2015 04:43:20 -0700 (PDT) Received: by 10.114.29.4 with HTTP; Wed, 7 Oct 2015 04:43:19 -0700 (PDT) In-Reply-To: References: Date: Wed, 7 Oct 2015 19:43:19 +0800 Message-ID: Subject: Re: executebatch: From: Craig Ringer To: Vladimir Sitnikov Cc: List Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) 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 For the record, fixed by Vladimir in https://github.com/pgjdbc/pgjdbc/pull/380 after comment discussion on https://github.com/pgjdbc/pgjdbc/commit/a6bd36faaedc779f932fa76f52bab9550f0fcd6d#diff-54e833c3fd25410b800ff28a1e189227R97 On 2 October 2015 at 21:29, Vladimir Sitnikov wrote: > Hi, > > I'm observing a performance degradation in executeBatch case when > upgrading 9.3-1102.jdbc41 -> 9.4-1203. > > 1102 -- 0.78 sec / executeBatch > 1203 -- 1.8 sec / executeBatch > > It looks like the degradation is caused by the fact that two "flag" > constants share the same value: > QUERY_FORCE_DESCRIBE_PORTAL = 128; and QUERY_DISALLOW_BATCHING = 128; > https://github.com/pgjdbc/pgjdbc/commit/a6bd36faaedc779f932fa76f52bab9550f0fcd6d#diff-54e833c3fd25410b800ff28a1e189227R97 > https://github.com/pgjdbc/pgjdbc/commit/a6bd36faaedc779f932fa76f52bab9550f0fcd6d#diff-54e833c3fd25410b800ff28a1e189227R106 > > Profiling shows that 1203 does QueryExecutorImpl.flushIfDeadlockRisk > -> sendSync a lot. > > I wonder if reusing 128 was intentional or not. > I'll try modifying QUERY_FORCE_DESCRIBE_PORTAL=512 to see if that helps. > > -- > Regards, > Vladimir Sitnikov > > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc -- 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