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

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-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.