Skip to main content

HGET

Syntax

HGET key field

Time complexity: O(1)

ACL categories: @read, @hash, @fast

Returns the value associated with field in the hash stored at key.

Return

Bulk string reply: the value associated with field, or nil when field is not present in the hash or key does not exist.

Examples

dragonfly> HSET myhash field1 "foo"
(integer) 1
dragonfly> HGET myhash field1
"foo"
dragonfly> HGET myhash field2
(nil)

Benchmark

Sustained throughput for HGET on a single instance, measured against Redis and Valkey on identical hardware. Higher is better.

Dragonfly9,310,000OPS
Valkey791,80011.8× OPS
Redis744,40012.5× OPS
02.38M4.75M7.13M9.5M
operations / second
EngineThroughputp50p99p99.9Avg Latency
Dragonfly9.31M ops/s0.468 ms0.875 ms1.163 ms0.489 ms
Valkey791.8K ops/s6.483 ms6.990 ms6.999 ms6.044 ms
Redis744.4K ops/s6.522 ms9.979 ms13.329 ms6.429 ms

Methodology

HardwareServer: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)
Client32 threads, 5 connections, pipeline 30
Dataset100M keys, 128B values, uniform key distribution
Duration60s (10s warmup), 1 trial
Measured2026-07-29

Ran through dfly_bench until throughput stabilized; the reported figure is the median throughput sampled during the run. Harness and raw output: dragonflydb/benchmarking.