create database test; use test; CREATE TABLE TEST ( group_name CHAR(2), number1 DECIMAL(12, 2), number2 DECIMAL(12, 2), var varchar(1) ) ENGINE=COLUMNSTORE; INSERT INTO TEST SELECT CAST(ROUND(RAND() * 10, 0) AS CHAR), ROUND(RAND() * 10000, 2), ROUND(RAND() * 10, 2), substring(MD5(RAND()),1,1) FROM seq_1_to_6000000; CREATE TABLE TEST2 ( group_name CHAR(2), number1 DECIMAL(12, 2), number2 DECIMAL(12, 2), var varchar(1) ) ENGINE=COLUMNSTORE; INSERT INTO TEST2 SELECT CAST(ROUND(RAND() * 10, 0) AS CHAR), ROUND(RAND() * 10000, 2), ROUND(RAND() * 10, 2), substring(MD5(RAND()),1,1) FROM seq_1_to_6000000; CREATE TABLE TEST3 ( group_name CHAR(2), number1 DECIMAL(12, 2), number2 DECIMAL(12, 2), var varchar(1) ) ENGINE=COLUMNSTORE; INSERT INTO TEST3 SELECT CAST(ROUND(RAND() * 10, 0) AS CHAR), ROUND(RAND() * 10000, 2), ROUND(RAND() * 10, 2), substring(MD5(RAND()),1,1) FROM seq_1_to_6000000; select * from TEST inner join TEST2 on TEST2.var = TEST.var inner join TEST3 on TEST3.number2 = TEST.number2;