2021-09-12 12:35:27 +00:00
|
|
|
-- Tags: shard
|
|
|
|
|
2015-11-15 08:31:08 +00:00
|
|
|
SELECT quantileExactWeighted(0.5)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
|
|
|
SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
|
|
|
SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
|
|
|
|
|
|
|
SELECT quantileTimingWeighted(0.5)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
|
|
|
SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
|
|
|
SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM (SELECT number FROM system.numbers LIMIT 1001);
|
2015-11-15 08:52:21 +00:00
|
|
|
|
2019-06-07 16:02:24 +00:00
|
|
|
DROP TABLE IF EXISTS numbers_1001;
|
|
|
|
CREATE TABLE numbers_1001 (number UInt64) ENGINE = Memory;
|
2016-08-13 05:06:36 +00:00
|
|
|
SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
|
2015-11-15 08:52:21 +00:00
|
|
|
SET max_block_size = 10;
|
2019-06-07 16:02:24 +00:00
|
|
|
INSERT INTO numbers_1001 SELECT number FROM system.numbers LIMIT 1001;
|
2015-11-15 08:52:21 +00:00
|
|
|
|
2019-06-07 16:02:24 +00:00
|
|
|
SELECT quantileExactWeighted(0.5)(number, 1) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
2019-06-07 16:09:21 +00:00
|
|
|
SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
|
|
|
SELECT quantilesExactWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
2015-11-15 08:52:21 +00:00
|
|
|
|
2019-06-07 16:02:24 +00:00
|
|
|
SELECT quantileTimingWeighted(0.5)(number, 1) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
2019-06-07 16:09:21 +00:00
|
|
|
SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, 1) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
|
|
|
SELECT quantilesTimingWeighted(0, 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 0.999, 1)(number, number) FROM remote('127.0.0.{2,3}', currentDatabase(), numbers_1001);
|
2015-11-15 08:52:21 +00:00
|
|
|
|
2019-06-07 16:02:24 +00:00
|
|
|
DROP TABLE numbers_1001;
|