2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS stripe1;
|
|
|
|
DROP TABLE IF EXISTS stripe2;
|
|
|
|
DROP TABLE IF EXISTS stripe3;
|
|
|
|
DROP TABLE IF EXISTS stripe4;
|
|
|
|
DROP TABLE IF EXISTS stripe5;
|
|
|
|
DROP TABLE IF EXISTS stripe6;
|
|
|
|
DROP TABLE IF EXISTS stripe7;
|
|
|
|
DROP TABLE IF EXISTS stripe8;
|
|
|
|
DROP TABLE IF EXISTS stripe9;
|
|
|
|
DROP TABLE IF EXISTS stripe10;
|
|
|
|
DROP TABLE IF EXISTS merge;
|
2016-12-25 04:50:06 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE stripe1 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe2 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe3 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe4 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe5 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe6 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe7 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe8 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe9 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
|
|
|
CREATE TABLE stripe10 ENGINE = StripeLog AS SELECT number AS x FROM system.numbers LIMIT 10;
|
2016-12-25 04:50:06 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE merge AS stripe1 ENGINE = Merge(test, '^stripe\\d+');
|
2016-12-25 04:50:06 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
SET max_threads = 1;
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
SET max_threads = 2;
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
SET max_threads = 5;
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
SET max_threads = 10;
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
SET max_threads = 20;
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT x, count() FROM merge GROUP BY x ORDER BY x;
|
2016-12-25 04:50:06 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS stripe1;
|
|
|
|
DROP TABLE IF EXISTS stripe2;
|
|
|
|
DROP TABLE IF EXISTS stripe3;
|
|
|
|
DROP TABLE IF EXISTS stripe4;
|
|
|
|
DROP TABLE IF EXISTS stripe5;
|
|
|
|
DROP TABLE IF EXISTS stripe6;
|
|
|
|
DROP TABLE IF EXISTS stripe7;
|
|
|
|
DROP TABLE IF EXISTS stripe8;
|
|
|
|
DROP TABLE IF EXISTS stripe9;
|
|
|
|
DROP TABLE IF EXISTS stripe10;
|
|
|
|
DROP TABLE IF EXISTS merge;
|