FEATURE.STATS
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.
Return value
Section titled “Return value”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' commandif the argument count is wrong.NOLICENSE feature-store requires a HotKV license. Contact sales@hotkv.comif your license does not include thefeature-storefeature.
Examples
Section titled “Examples”127.0.0.1:6379> FEATURE.STATS user_features1) "entities"2) (integer) 13) "totalReads"4) (integer) 45) "totalWrites"6) (integer) 27) "memoryBytes"8) (integer) 312The memory figure depends on your data.
Compatibility
Section titled “Compatibility”HotKV-only command. Redis and Valkey have no equivalent.
See also
Section titled “See also”FEATURE.CREATE, FEATURE.SET, FEATURE.GET, FEATURE.BATCH, FEATURE.SCHEMA, FEATURE.DROP, FEATURE.LIST, AI features guide
Was this helpful?
Thanks for the feedback.