Database Reference
In-Depth Information
Both
INSERT
and
UPDATE
statements also support expiring data using a
time-to-live statement. Simply append
USING TTL <seconds>
to the end
of an
INSERT
statement. For
UPDATE
statements, you need to put it after
the table name:
UPDATE <table> USING TTL <seconds>
.
To improve performance,
insert
and
update
statements can be wrapped
in a
BATCH
statement. This vastly improves performance when writing to
a number of different tables or processing a large number of requests. To
use a
BATCH
statement, simply start a command with
BEGIN BATCH
. Write
statements as you normally would, and when you're ready to submit, add an
APPLY BATCH
to the end of the statement.