DEL
Syntax
DEL key [key ...]
Time complexity: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).
ACL categories: @keyspace, @write, @slow
Removes the specified keys. A key is ignored if it does not exist.
Return
Integer reply: The number of keys that were removed.
Examples
dragonfly> SET key1 "Hello"
OK
dragonfly> SET key2 "World"
OK
dragonfly> DEL key1 key2 key3
(integer) 2
Benchmark
Sustained throughput for DEL on a single instance, measured against Redis and Valkey on identical hardware. Higher is better.
| Engine | Throughput | p50 | p99 | p99.9 | Avg Latency |
|---|---|---|---|---|---|
| Dragonfly | 10.25M ops/s | 0.445 ms | 0.822 ms | 1.131 ms | 0.456 ms |
| Valkey | 2.38M ops/s | 1.759 ms | 3.992 ms | 4.461 ms | 2.008 ms |
| Redis | 1.96M ops/s | 2.255 ms | 6.612 ms | 7.977 ms | 2.439 ms |
Methodology
| Hardware | Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64) |
| Client | 32 threads, 5 connections, pipeline 30 |
| Dataset | 100M keys, 128B values, uniform key distribution |
| Duration | 300s (10s warmup), 1 trial |
| Measured | 2026-07-28 |
Ran through dfly_bench until throughput stabilized; the reported figure is the median throughput sampled during the run. Harness and raw output: dragonflydb/benchmarking.