Re: JDBC prepared statement: a 32767 limit of arguments number - Mailing list pgsql-jdbc

From Sehrope Sarkuni
Subject Re: JDBC prepared statement: a 32767 limit of arguments number
Date
Msg-id CAH7T-ap-4i6Qinbjw8Kn1NZ6WUdYjGHLCUE_i_WxmnUtkAe+7w@mail.gmail.com
Whole thread Raw
In response to Re: JDBC prepared statement: a 32767 limit of arguments number  (Dave Cramer <davecramer@postgres.rocks>)
List pgsql-jdbc
On Fri, Mar 11, 2022 at 8:55 AM Dave Cramer <davecramer@postgres.rocks> wrote:
I'd be willing to bet it's pretty close to COPY. Do we have any numbers ?

You'd win that bet.

I just tried it out with 25K inserts using eithers VALUES, UNNEST arrays, and COPY IN. 

In a completely unscientific test on my active machine, the array and COPY IN were on par with each other, running in about 30-40ms.

Both of them were 250x faster than using individual separate statements with VALUES.

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: JDBC prepared statement: a 32767 limit of arguments number
Next
From: Blake McBride
Date:
Subject: JDBC: ERROR: portal "C_2" does not exist