mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
37 lines
1.5 KiB
XML
37 lines
1.5 KiB
XML
<test>
|
|
<settings>
|
|
<allow_experimental_bigint_types>1</allow_experimental_bigint_types>
|
|
<max_threads>1</max_threads>
|
|
<max_insert_threads>8</max_insert_threads>
|
|
</settings>
|
|
|
|
<create_query>CREATE TABLE perf_avg(
|
|
num UInt64,
|
|
num_u Decimal256(75) MATERIALIZED toDecimal256(num / 400000, 75),
|
|
num_f Float64 MATERIALIZED num / 100
|
|
) ENGINE = MergeTree() ORDER BY num
|
|
</create_query>
|
|
|
|
<fill_query>
|
|
INSERT INTO perf_avg(num)
|
|
SELECT toUInt64(UserID / (WatchID + 1) * 1000000)
|
|
FROM hits_100m_single
|
|
LIMIT 50000000
|
|
</fill_query>
|
|
|
|
<fill_query>optimize table perf_avg final</fill_query>
|
|
|
|
<query>SELECT avg(num) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avg(2 * num) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avg(num_u) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avg(num_f) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_f, num) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_f, num_f) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_f, num_u) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_u, num_f) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_u, num) FROM perf_avg FORMAT Null</query>
|
|
<query>SELECT avgWeighted(num_u, num_u) FROM perf_avg FORMAT Null</query>
|
|
|
|
<drop_query>DROP TABLE IF EXISTS perf_avg</drop_query>
|
|
</test>
|