Batch inserts
A batch inserts several rows together. Use one multi-row VALUES statement or one formatted input statement when the rows belong to one operation.
Multi-row values
CREATE TABLE measurements(id UInt32, value Float64);
INSERT INTO measurements VALUES (1, 12.5), (2, 13.0), (3, 11.5);SELECT count(*) AS measurements, avg(value) AS average_value
FROM measurements
FORMAT csv;3,12.333333333333334Files and streams
For data already encoded as CSV, JSON or a binary container, supply it with INSERT FORMAT, native stdin, FROM INFILE or an HTTP attached upload. Choose a format that supports input and preserves the intended types.
Client uploads can exceed 16 MiB in total. Ordinary SQL/control requests and responses retain their protocol limits; request-processing and admission limits still apply to uploads.
Completion and transactions
There is no asynchronous INSERT queue. A successful response follows completion of the statement. Use one explicit transaction for several related statements that must commit together.
See client file input and transactions.