-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is your feature request related to a problem? Please describe.
When querying large datasets with a big LIMIT (like 50 000 for example), the time to process the query inside Cube is very slow compared to the same query directly run via ClickHouse CLI in SQL.
Simple SELECT with 50 000 rows on Cube (3.8s):

Same query directly on ClickHouse (instant):

Describe the solution you'd like
The compression option on ClickHouse JS client (https://clickhouse.com/docs/integrations/javascript#compression) can help with large data (https://clickhouse.com/docs/integrations/javascript#tips-for-performance-optimizations).
With compression enabled (1.1s):

Describe alternatives you've considered
I have tried to add more CPU/RAM to the Cube API service, but the issue is still present.
Additional context
Compression cannot be enabled with read only https://clickhouse.com/docs/integrations/javascript#read-only-users