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_UPDATE — Compact first, or rewrite as a subquery so the planner picks KEYED_DELETE_FROM_SUBQUERY instead.
See also
- Execute — Overview — RPC contract, enums, refusals,
noopsemantics - SELECT · INSERT · UPDATE · MERGE — sibling SQL shapes
- Data → DeleteRows — typed shortcut (same keyed-vs-non-keyed routing)
- Maintenance → Compact — drain the write log before non-keyed deletes
- Tables → DescribeTable — post-drain row classification (
last_drain_*) - Core Concepts → WriteStrategy — every routing variant