Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
A followup to https://jira.mariadb.org/browse/MCOL-5882
There we found that Columnstore can speed up query processing even with only InnoDB tables. For CS to speed up GROUP BY of InnoDB tables, the tables has to be partitioned and CS has to have a support for accessing partitions.
This task is dedicated for that.
SQL to verify:
USE test; |
|
CREATE USER IF NOT EXISTS'cejuser'@'localhost' IDENTIFIED BY 'Vagrant1|0000001'; |
GRANT ALL PRIVILEGES ON *.* TO 'cejuser'@'localhost'; |
FLUSH PRIVILEGES; |
|
DROP TABLE IF EXISTS t1; |
CREATE TABLE t1( a DECIMAL(12, 2), b int ) ENGINE=innodb PARTITION BY KEY(b,a) PARTITIONS 4; |
INSERT INTO t1 SELECT ROUND(RAND() * 1000000, 2),ROUND(RAND() * 10000, 0) FROM seq_1_to_100; |
CREATE TABLE IF NOT EXISTS t2 ( a DECIMAL(12, 2), b int ) ENGINE=COLUMNSTORE; |
|
SELECT COUNT(*) FROM (SELECT * FROM t1 PARTITION (p0)) tt; |
SELECT COUNT(*) FROM (SELECT * FROM t2 UNION ALL SELECT * FROM t1 PARTITION (p0)) tt; |
Last two quries should return identical counts. Right now second query returns result for full table scan.