Manipulations with Table TTL
REMOVE TTL
TTL-property can be removed from table with the following query:
Example
Run OPTIMIZE
to force TTL
cleanup:
OPTIMIZE TABLE table_with_ttl FINAL;
Second row was deleted from table.
ALTER TABLE table_with_ttl REMOVE TTL;
Re-insert the deleted row and force the TTL
cleanup again with OPTIMIZE
:
The is no longer there, so the second row is not deleted:
│ 2020-12-11 12:44:57 │ 1 │ username1 │
│ 2020-08-11 12:44:57 │ 2 │ username2 │
└───────────────────────┴─────────┴──────────────┘
- Modify column .