Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
Description
Consider the screenshot attached for the query execution mentioned below:
CREATE TABLE IF NOT EXISTS t1( a DECIMAL(12, 2), b int ) ENGINE=innodb;
|
INSERT INTO t1 SELECT ROUND(RAND() * 1000000, 2),ROUND(RAND() * 10000, 0) FROM seq_1_to_32000000;
|
|
CREATE TABLE IF NOT EXISTS t2 ( a DECIMAL(12, 2), b int ) ENGINE=COLUMNSTORE;
|
INSERT INTO t2 SELECT ROUND(RAND() * 1000000, 2),ROUND(RAND() * 10000, 0) FROM seq_1_to_2;
|
|
select calSetTrace(1);
|
select b, sum(a) from t2 where 0=1 group by b
|
UNION ALL
|
select b, sum(a) from t1 where b between 0 AND 2500 group by b UNION ALL
|
select b, sum(a) from t1 where b between 2501 AND 5000 group by b UNION ALL
|
select b, sum(a) from t1 where b between 5001 AND 7500 group by b UNION ALL
|
select b, sum(a) from t1 where b between 7501 AND 10000 group by b ;
|
select calGetTrace();
|