I have been testing the new sketches recently and found that if we combine this metrics to TopN query will cause the query extremely slow. Our datasets contains about ~6M rows and the dimension we set for TopN query has about ~3M cardinality. I tried TopN query order by another simple longSum metrics and it will return really fast. But when i change the longSum to thetaSketch, it becomes really slow and timeout (5min).
Any suggestions to help with the performance? Thanks.