TDIGEST.CREATE
Syntax
TDIGEST.CREATE key [COMPRESSIONÂ compression]
- Available in:
- Redis Stack / Bloom 2.4.0
- Time complexity:
- O(1)
Allocates memory and initializes a new t-digest sketch.
Required arguments
key
is key name for this new t-digest sketch.
Optional arguments
COMPRESSION compression
is a controllable tradeoff between accuracy and memory consumption. 100 is a common value for normal uses. 1000 is more accurate. If no value is passed by default the compression will be 100. For more information on scaling of accuracy versus the compression parameter see [_The t-digest: Efficient estimates of distributions_](https://www.sciencedirect.com/science/article/pii/S2665963820300403).
Return value
Simple string reply - OK
if executed correctly, or Error reply otherwise.
Examples
redis> TDIGEST.CREATE t 100
OK