Skip to Content
We are live but in Staging 🎉

DELETE

DELETE shapes. Same three keyed forms as UPDATE — KEYED_DELETE (point), KEYED_RANGE_DELETE, KEYED_DELETE_FROM_SUBQUERY — plus a non-keyed Delta-direct path with the same WAL-bypass risk. For the RPC contract and full enum reference, see the Execute hub.

Keyed deletes

All three shapes route through the write log as tombstones; the compactor builds the Delta DELETE predicate on drain. Safe under concurrent writes.

-- KEYED_DELETE (point) DELETE FROM events WHERE id = 1 AND user_id = 'u-101'; -- KEYED_RANGE_DELETE DELETE FROM events WHERE id BETWEEN 1000 AND 2000 AND user_id = 'u-101'; -- KEYED_DELETE_FROM_SUBQUERY DELETE FROM events WHERE (id, user_id) IN (SELECT id, user_id FROM events_to_purge);

Response: strategy is one of WRITE_STRATEGY_KEYED_DELETE / _RANGE_DELETE / _DELETE_FROM_SUBQUERY. rowsWritten is the tombstone count.

Non-keyed deletes — ⚠️ WAL-bypass

-- Predicate doesn't match merge_keys DELETE FROM events WHERE occurred_at < TIMESTAMP '2025-01-01 00:00:00';

Response: strategy: WRITE_STRATEGY_NON_KEYED_DELETE, same warning + same safe patterns as NON_KEYED_UPDATECompact first, or rewrite as a subquery so the planner picks KEYED_DELETE_FROM_SUBQUERY instead.

See also