WRITETIME is a CQL function that returns the write timestamp attached to a non-primary-key column value. It helps inspect which write ScyllaDB uses when concurrent operations affect the same cell. section 6.1.2 section 6.6
Compare timestamps for an author
Query Alice Author’s row with SELECT id, WRITETIME(name), WRITETIME(bio) FROM authors WHERE id = ...;. The returned timestamps show that bio was written later than name, reflecting the later update. section 6.1.2
Use WRITETIME to inspect cell-level write ordering, while remembering:
- Each non-primary-key value receives a timestamp, and newer timestamps take precedence when writes are reconciled. section 6.1.2
- WRITETIME reports timestamps; USING TIMESTAMP controls them, but explicit timestamps are intended for specific cases such as data migrations. section 6.1.2
