Re: JDBC prepared statement: a 32767 limit of arguments number

From: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
To: Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: Vladislav Malyshkin <mal(at)gromco(dot)com>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-jdbc(at)lists(dot)postgresql(dot)org" <pgsql-jdbc(at)lists(dot)postgresql(dot)org>
Subject: Re: JDBC prepared statement: a 32767 limit of arguments number
Date: 2022-03-11 16:46:32
Message-ID: CAH7T-ap-4i6Qinbjw8Kn1NZ6WUdYjGHLCUE_i_WxmnUtkAe+7w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, Mar 11, 2022 at 8:55 AM Dave Cramer <davecramer(at)postgres(dot)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/

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Blake McBride 2022-03-11 18:07:09 JDBC: ERROR: portal "C_2" does not exist
Previous Message Dave Cramer 2022-03-11 13:54:59 Re: JDBC prepared statement: a 32767 limit of arguments number