Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

FEATURE.STATS

Last updated
FEATURE.STATS group
Group
Feature store
Complexity
O(1)
Arity
2 (exactly, counting the command name)
Flags
read-only, fast
Keys
first 1, last 1, step 1
HotKV Cloud
Performance and Scale
On-Premise
requires the feature-store license feature

The feature store keeps typed feature values for entities (users, items, sessions) in named feature groups, for low-latency reads at model inference time. FEATURE.STATS reports counters for one group. For a group that does not exist, every counter is zero.

The reply is a flat array of alternating field names and values in both RESP2 and RESP3 (it is not sent as a RESP3 map). The fields, in order:

Field Type Meaning
entities Integer Entities stored.
totalReads Integer Entity reads (FEATURE.BATCH counts one per entity).
totalWrites Integer FEATURE.SET calls.
memoryBytes Integer Approximate memory used.

Errors:

  • ERR wrong number of arguments for 'feature.stats' command if the argument count is wrong.
  • NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.com if your license does not include the feature-store feature.
127.0.0.1:6379> FEATURE.STATS user_features
1) "entities"
2) (integer) 1
3) "totalReads"
4) (integer) 4
5) "totalWrites"
6) (integer) 2
7) "memoryBytes"
8) (integer) 312

The memory figure depends on your data.

HotKV-only command. Redis and Valkey have no equivalent.

FEATURE.CREATE, FEATURE.SET, FEATURE.GET, FEATURE.BATCH, FEATURE.SCHEMA, FEATURE.DROP, FEATURE.LIST, AI features guide