kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phong Pham <phongpham1...@gmail.com>
Subject Problem with limit and joint aggregation
Date Tue, 17 Jan 2017 11:37:37 GMT
Hi all,
    I definedsome dimensions, for example: A,B,C as  joint aggregation.
When i executed query:

SELECT A,B,C, SUM(metrics) as metrics
FROM table1
WHERE DateStats <= x and DateStats >= x
GROUP BY A,B,C
LIMIT 250

Query is very fast, but Metrics (from SUM(metrics)) Value just sum data
within limit (250 rows). If i used ORDER BY <A>, results will be true but
performance is so bad (If Total Scan Count is over 2-3 milions).
Please explain to me this problem.

Thanks.

Mime
View raw message