ClickHouse/dbms/tests/performance/date_time_64.xml
Nikolai Kochetov 20026d7931 Added perftest.
2019-12-11 16:17:30 +03:00

53 lines
2.3 KiB
XML

<test>
<type>loop</type>
<preconditions>
<table_exists>default.hits_100m_single</table_exists>
</preconditions>
<create_query>CREATE TABLE dt (x DateTime) ENGINE = MergeTree ORDER BY tuple()</create_query>
<create_query>CREATE TABLE dt64 (x DateTime64(3)) ENGINE = MergeTree ORDER BY tuple()</create_query>
<fill_query>INSERT INTO dt SELECT EventTime FROM hits_100m_single</fill_query>
<fill_query>INSERT INTO dt64 SELECT toDateTime64(toDecimal64(toUInt64(EventTime), 3) + toDecimal64((rand() % 1000) / 1000, 3), 3) FROM hits_100m_single</fill_query>
<stop_conditions>
<all_of>
<iterations>5</iterations>
<min_time_not_changing_for_ms>10000</min_time_not_changing_for_ms>
</all_of>
<any_of>
<iterations>100</iterations>
<total_time_ms>60000</total_time_ms>
</any_of>
</stop_conditions>
<main_metric>
<min_time/>
</main_metric>
<query>SELECT count() FROM dt where not ignore(x)</query>
<query>SELECT count() FROM dt64 where not ignore(x)</query>
<query>SELECT max(x) FROM dt</query>
<query>SELECT max(x) FROM dt64</query>
<query>SELECT count() from dt where not ignore(toString(x))</query>
<query>SELECT count() from dt64 where not ignore(toString(x))</query>
<query>SELECT count() from dt where not ignore(toStartOfDay(x))</query>
<query>SELECT count() from dt64 where not ignore(toStartOfDay(x))</query>
<query>SELECT count() from dt where not ignore(toStartOfWeek(x))</query>
<query>SELECT count() from dt64 where not ignore(toStartOfWeek(x))</query>
<query>SELECT count() from dt where not ignore(toRelativeMinuteNum(x))</query>
<query>SELECT count() from dt64 where not ignore(toRelativeMinuteNum(x))</query>
<query>SELECT count() from dt where not ignore(addDays(x, 1))</query>
<query>SELECT count() from dt64 where not ignore(addDays(x, 1))</query>
<query>SELECT sum(x = x) FROM dt</query>
<query>SELECT sum(x = x) FROM dt64</query>
<query>SELECT sum(toDateTime(toString(x)) != x) FROM dt</query>
<query>SELECT sum(toDateTime64(toString(x), 3) != x) FROM dt64</query>
<drop_query>DROP TABLE IF EXISTS dt</drop_query>
<drop_query>DROP TABLE IF EXISTS dt64</drop_query>
</test>