clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

[QA] clickhouse-jdbc: What is the maximum rows/bytes for a single `INSERT`?

Open leiless opened this issue 1 year ago • 1 comments

I have a PreparedStatement with INSERT INTO db.table (col1, col2, ..., colN) VALUES (val1, val2, ..., valN), (val1, val2, ..., valN), ..., (val1, val2, ..., valN).

The (val1, val2, ..., valN) values tuple can repeat up to 20_000 times.

Wonder if there is a maximum rows/bytes (on clickhouse-jdbc and ClickHouse server) that can be INSERTed on a single insertion command?

I'm using clickhouse-jdbc 0.3.2-patch11 and ClickHouse server 23.8.14.

cc @zhicwu, @chernser.

leiless avatar Jun 12 '24 01:06 leiless

@leiless There is no limit for number of values or number of value tuples in a request. There may be some runtime limitations for example, very long strings may be a problem for hosts with small about of memory. Would you please elaborate more about your usecase and assumptions? Thanks!

chernser avatar Jun 19 '24 02:06 chernser

Closing this out as it's effectively answered, but if you have further questions please reach out!

Paultagoras avatar Jan 23 '25 02:01 Paultagoras