executebatch: - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject executebatch:
Date
Msg-id CAB=Je-GagyN1DH0UG=u62RHCzQ4ghxTVh4FVoBmkNAOeRc+=+g@mail.gmail.com
Whole thread Raw
Responses Re: executebatch:
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: DatabaseMetaData.getTypeInfo() - returns all tables as well
Next
From: Tom Smith
Date:
Subject: latest jdbc release