payam-int opened a new issue, #17796: URL: https://github.com/apache/druid/issues/17796
### Affected Version 31.0.0 ### Description The thetaSketch aggregator in Druid exhibits significantly slower performance compared to an equivalent query executed via Druid SQL. Specifically, a native Druid query using thetaSketch takes approximately 10 seconds, while the corresponding SQL query completes in under 1 second. SQL: ``` SELECT THETA_SKETCH_ESTIMATE(DS_THETA("UserCount") FILTER (WHERE "Dx" = 0))) AS UserCount, "Campaign" FROM "campaigns" WHERE __time >= '2025-01-01' AND __time <= '2025-01-10' GROUP BY "Campaign" ``` Native Query: ``` { "queryType": "groupBy", "dataSource": "campaigns", "intervals": { "type": "intervals", "intervals": [ "2025-01-01T00:00:00Z/2025-01-10T00:00:00.002Z" ] }, "dimensions": [ { "type": "default", "dimension": "Campaign", "outputName": "Campaign" } ], "granularity": "all", "aggregations": [ { "type": "filtered", "name": "UserCount", "aggregator": { "type": "thetaSketch", "name": "UserCount", "fieldName": "UserCount" }, "filter": { "type": "selector", "dimension": "Dx", "value": "0" } } ] } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org