Hi Everyone, For calculating Nth percentile over ...
# troubleshooting
a
Hi Everyone, For calculating Nth percentile over a latency(in ms) column in Realtime table, and also having the percentile in startree index which is a better option?
Quantile Digest Algorithm
Copy code
PERCENTILEEST(request_metadata.response.elapsed_time,50) AS MedianLatency, 
PERCENTILEEST(request_metadata.response.elapsed_time,95) AS P95Latency,
or
T-Digest Algorithm
Copy code
PERCENTILETDIGEST(request_metadata.response.elapsed_time,50,1000) AS MedianLatency, 
PERCENTILETDIGEST(request_metadata.response.elapsed_time,95,1000) AS P95Latency,
Closest to real value is absolute priority since this is API usage metrics dashboard. I notice PERCENTILETDIGEST is giving closer values for Median latency but for P95 latency both give similar. which Percentile function will perform best in millions of rows of dataset and realtime stream ingestion scenario? Please help me suggest this.
m
I have seem folks use T-Digest more (that is not to say that Quantile is worse or better). Seems you have already performed your evaluations, I'd recommend you go with what is working better for you. In the worst case, this is not a one way door, you can always switch to the other one if need be.
a
Thanks a lot @Mayank :)