Documentation — Commands reference
Adds one row to a table.
insert into TABLE_NAME [ ( COL1, COL2, ... ) ] values ( VAL1, VAL2, ... );
values must give a value for every column, in the order of the table.select.INSERT privilege. The table must be deployed and not locked.insert into visitors values ( 1, 'Ada', 'FR' );
insert into visitors ( id, name ) values ( 2, 'Grace' );
The answer is One row inserted., followed by the number of errors if some copies could not be written.
NULL is hashed like any other value.2+3; its result is used. If you need every row with the same key to land in the same partition, do not use an expression in the hash key: write the plain value.The row goes to its partition, on every copy of that partition.
The row is cut into its chunks and every chunk goes to its own segment, so one insert costs more than for a narrow table: about 1.2 to 1.5 seconds from the command line client on the test tables of 20,001 and 585,011 columns.
The statement can be very long: a row of a table with 585,011 columns is several megabytes of text.