fix more queries

This commit is contained in:
Alexander Kuzmenkov 2020-06-26 22:11:43 +03:00
parent c8b633fe47
commit 5d324751a0
38 changed files with 193 additions and 232 deletions

View File

@ -6,7 +6,7 @@
http://www.caida.org/data/active/ipv4_dnsnames_dataset.xml. http://www.caida.org/data/active/ipv4_dnsnames_dataset.xml.
Randomly selected entries from first 50000 rows of dataset. --> Randomly selected entries from first 50000 rows of dataset. -->
<fill_query> INSERT INTO ips_v4 VALUES ('116.253.40.133')('183.247.232.58')('116.106.34.242')('111.56.27.171')('183.245.137.140')('183.212.25.70')('162.144.2.57')('111.4.229.190')('59.52.3.168')('115.11.21.200')('121.28.97.113')('111.46.39.248')('120.192.122.34')('113.56.44.105')('116.66.238.92')('67.22.254.206')('115.0.24.191')('182.30.107.86')('223.73.153.243')('115.159.103.38')('36.186.75.121')('111.56.188.125')('115.14.93.25')('211.97.110.141')('61.58.96.173')('203.126.212.37')('192.220.125.142')('115.22.20.223')('121.25.160.80')('117.150.98.199')('183.211.172.143')('180.244.18.143')('209.131.3.252')('220.200.1.22')('171.225.130.45')('115.4.78.200')('36.183.59.29')('218.42.159.17')('115.13.39.164')('142.254.161.133')('116.2.211.43')('36.183.126.25')('66.150.171.196')('104.149.148.137')('120.239.82.212')('111.14.182.156')('115.6.63.224')('153.35.83.233')('113.142.1.1')('121.25.82.29')('62.151.203.189')('104.27.46.146')('36.189.46.88')('116.252.54.207')('64.77.240.1')('142.252.102.78')('36.82.224.170')('117.33.191.217')('144.12.164.251')('122.10.93.66')('104.25.84.59')('111.4.242.106')('222.216.51.186')('112.33.13.212')('115.9.240.116')('171.228.0.153')('45.3.47.158')('69.57.193.230')('115.6.104.199')('104.24.237.140')('199.17.84.108')('120.193.17.57')('112.40.38.145')('67.55.90.43')('180.253.57.249')('14.204.253.158')('1.83.241.116')('202.198.37.147')('115.6.31.95')('117.32.14.179')('23.238.237.26')('116.97.76.104')('1.80.2.248')('59.50.185.152')('42.117.228.166')('119.36.22.147')('210.66.18.184')('115.19.192.159')('112.15.128.113')('1.55.138.211')('210.183.19.113')('42.115.43.114')('58.16.171.31')('171.234.78.185')('113.56.43.134')('111.53.182.225')('107.160.215.141')('171.229.231.90')('58.19.84.138')('36.79.88.107')</fill_query> <fill_query>INSERT INTO ips_v4 VALUES ('116.253.40.133')('183.247.232.58')('116.106.34.242')('111.56.27.171')('183.245.137.140')('183.212.25.70')('162.144.2.57')('111.4.229.190')('59.52.3.168')('115.11.21.200')('121.28.97.113')('111.46.39.248')('120.192.122.34')('113.56.44.105')('116.66.238.92')('67.22.254.206')('115.0.24.191')('182.30.107.86')('223.73.153.243')('115.159.103.38')('36.186.75.121')('111.56.188.125')('115.14.93.25')('211.97.110.141')('61.58.96.173')('203.126.212.37')('192.220.125.142')('115.22.20.223')('121.25.160.80')('117.150.98.199')('183.211.172.143')('180.244.18.143')('209.131.3.252')('220.200.1.22')('171.225.130.45')('115.4.78.200')('36.183.59.29')('218.42.159.17')('115.13.39.164')('142.254.161.133')('116.2.211.43')('36.183.126.25')('66.150.171.196')('104.149.148.137')('120.239.82.212')('111.14.182.156')('115.6.63.224')('153.35.83.233')('113.142.1.1')('121.25.82.29')('62.151.203.189')('104.27.46.146')('36.189.46.88')('116.252.54.207')('64.77.240.1')('142.252.102.78')('36.82.224.170')('117.33.191.217')('144.12.164.251')('122.10.93.66')('104.25.84.59')('111.4.242.106')('222.216.51.186')('112.33.13.212')('115.9.240.116')('171.228.0.153')('45.3.47.158')('69.57.193.230')('115.6.104.199')('104.24.237.140')('199.17.84.108')('120.193.17.57')('112.40.38.145')('67.55.90.43')('180.253.57.249')('14.204.253.158')('1.83.241.116')('202.198.37.147')('115.6.31.95')('117.32.14.179')('23.238.237.26')('116.97.76.104')('1.80.2.248')('59.50.185.152')('42.117.228.166')('119.36.22.147')('210.66.18.184')('115.19.192.159')('112.15.128.113')('1.55.138.211')('210.183.19.113')('42.115.43.114')('58.16.171.31')('171.234.78.185')('113.56.43.134')('111.53.182.225')('107.160.215.141')('171.229.231.90')('58.19.84.138')('36.79.88.107')</fill_query>
<fill_query>insert into ips_v4 select * from ips_v4</fill_query> <fill_query>insert into ips_v4 select * from ips_v4</fill_query>
<fill_query>insert into ips_v4 select * from ips_v4</fill_query> <fill_query>insert into ips_v4 select * from ips_v4</fill_query>
@ -21,6 +21,7 @@
<fill_query>insert into ips_v4 select * from ips_v4</fill_query> <fill_query>insert into ips_v4 select * from ips_v4</fill_query>
<fill_query>insert into ips_v4 select * from ips_v4</fill_query> <fill_query>insert into ips_v4 select * from ips_v4</fill_query>
<fill_query>insert into ips_v4 select * from ips_v4</fill_query> <fill_query>insert into ips_v4 select * from ips_v4</fill_query>
<fill_query>insert into ips_v4 select * from ips_v4</fill_query>
<query tag='IPv4StringToNum'>SELECT count() FROM ips_v4 WHERE NOT ignore(IPv4StringToNum(materialize(ip))) SETTINGS max_threads=1</query> <query tag='IPv4StringToNum'>SELECT count() FROM ips_v4 WHERE NOT ignore(IPv4StringToNum(materialize(ip))) SETTINGS max_threads=1</query>

View File

@ -1,5 +1,5 @@
<test> <test>
<settings><max_threads>1</max_threads></settings>
<!-- The CAIDA UCSD IPv4 Routed /24 DNS Names Dataset - 20181130, <!-- The CAIDA UCSD IPv4 Routed /24 DNS Names Dataset - 20181130,
http://www.caida.org/data/active/ipv4_dnsnames_dataset.xml. http://www.caida.org/data/active/ipv4_dnsnames_dataset.xml.
@ -22,6 +22,7 @@
<fill_query>insert into ips_v6 select * from ips_v6</fill_query> <fill_query>insert into ips_v6 select * from ips_v6</fill_query>
<fill_query>insert into ips_v6 select * from ips_v6</fill_query> <fill_query>insert into ips_v6 select * from ips_v6</fill_query>
<fill_query>insert into ips_v6 select * from ips_v6</fill_query> <fill_query>insert into ips_v6 select * from ips_v6</fill_query>
<fill_query>insert into ips_v6 select * from ips_v6</fill_query>
<query tag="IPv6StringToNum">SELECT count() FROM ips_v6 WHERE NOT ignore(IPv6StringToNum(materialize(ip)))</query> <query tag="IPv6StringToNum">SELECT count() FROM ips_v6 WHERE NOT ignore(IPv6StringToNum(materialize(ip)))</query>
<query tag="IPv6NumToString+IPv6StringToNum">SELECT count() FROM ips_v6 WHERE NOT ignore(IPv6NumToString(IPv6StringToNum(materialize(ip))))</query> <query tag="IPv6NumToString+IPv6StringToNum">SELECT count() FROM ips_v6 WHERE NOT ignore(IPv6NumToString(IPv6StringToNum(materialize(ip))))</query>

View File

@ -1,4 +1,5 @@
<test> # FIXME this instability is abysmal, investigate the unstable queries
<test max_ignored_relative_change="1.5">
<settings> <settings>
<allow_suspicious_codecs>1</allow_suspicious_codecs> <allow_suspicious_codecs>1</allow_suspicious_codecs>
</settings> </settings>

View File

@ -10,7 +10,7 @@
<query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < URL]]></query> <query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < URL]]></query>
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < PageCharset]]></query> <query><![CDATA[SELECT count() FROM hits_100m_single WHERE URL < PageCharset]]></query>
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < SearchPhrase SETTINGS max_threads = 2]]></query> <query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < SearchPhrase SETTINGS max_threads = 2]]></query>
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < URL]]></query> <query><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < URL]]></query>
<query><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < PageCharset SETTINGS max_threads = 2]]></query> <query><![CDATA[SELECT count() FROM hits_100m_single WHERE SearchPhrase < PageCharset SETTINGS max_threads = 2]]></query>
<query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE notEmpty(SearchPhrase) AND SearchPhrase < SearchPhrase SETTINGS max_threads = 2]]></query> <query short="1"><![CDATA[SELECT count() FROM hits_100m_single WHERE notEmpty(SearchPhrase) AND SearchPhrase < SearchPhrase SETTINGS max_threads = 2]]></query>

View File

@ -1,7 +1,4 @@
<test> <test>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore([[zero], [zero]])</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore([[], [zero]])</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore([[zero], [zero]])</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore([[], [zero]])</query>
</test> </test>

View File

@ -1,11 +1,11 @@
<test> <test>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(if(rand() % 2, toDateTime('2019-02-04 01:24:31'), toDate('2019-02-04')))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(if(rand() % 2, toDateTime('2019-02-04 01:24:31'), toDate('2019-02-04')))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(multiIf(rand() % 2, toDateTime('2019-02-04 01:24:31'), toDate('2019-02-04')))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(multiIf(rand() % 2, toDateTime('2019-02-04 01:24:31'), toDate('2019-02-04')))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(if(rand() % 2, [toDateTime('2019-02-04 01:24:31')], [toDate('2019-02-04')]))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(if(rand() % 2, [toDateTime('2019-02-04 01:24:31')], [toDate('2019-02-04')]))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(multiIf(rand() % 2, [toDateTime('2019-02-04 01:24:31')], [toDate('2019-02-04')]))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(multiIf(rand() % 2, [toDateTime('2019-02-04 01:24:31')], [toDate('2019-02-04')]))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(if(rand() % 2, toDateTime(rand()), toDate(rand())))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(if(rand() % 2, toDateTime(rand()), toDate(rand())))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(multiIf(rand() % 2, toDateTime(rand()), toDate(rand())))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(multiIf(rand() % 2, toDateTime(rand()), toDate(rand())))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(if(rand() % 2, [toDateTime(rand())], [toDate(rand())]))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(if(rand() % 2, [toDateTime(rand())], [toDate(rand())]))</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(multiIf(rand() % 2, [toDateTime(rand())], [toDate(rand())]))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(multiIf(rand() % 2, [toDateTime(rand())], [toDate(rand())]))</query>
</test> </test>

View File

@ -1,13 +1,9 @@
<test> <test>
<create_query>CREATE TABLE data(k UInt64, v UInt64) ENGINE = MergeTree ORDER BY k</create_query> <create_query>CREATE TABLE data(k UInt64, v UInt64) ENGINE = MergeTree ORDER BY k</create_query>
<fill_query>INSERT INTO data SELECT number, 1 from numbers(10000000)</fill_query> <fill_query>INSERT INTO data SELECT number, 1 from numbers(10000000)</fill_query>
<query tag='count_10M'>SELECT count() FROM data</query> <query tag='count_10M' short='1'>SELECT count() FROM data</query>
<drop_query>DROP TABLE IF EXISTS data</drop_query> <drop_query>DROP TABLE IF EXISTS data</drop_query>
</test> </test>

View File

@ -8,6 +8,11 @@
<value>SHA224</value> <value>SHA224</value>
<value>SHA256</value> <value>SHA256</value>
<value>halfMD5</value> <value>halfMD5</value>
</values>
</substitution>
<substitution>
<name>hash_fast</name>
<values>
<value>sipHash64</value> <value>sipHash64</value>
<value>sipHash128</value> <value>sipHash128</value>
</values> </values>
@ -25,6 +30,13 @@
<value>materialize('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sollicitudin nisi ac erat mollis dapibus. Maecenas leo purus, bibendum eu erat eget, iaculis molestie tortor. Phasellus maximus odio nec mauris ultrices dictum. Morbi efficitur nisl eget congue mollis. Vestibulum pharetra diam vitae urna interdum, eget ultricies justo sollicitudin. Nunc sit amet purus id leo tempus dignissim. Donec ac lacus ut orci tempus scelerisque quis ultricies nibh. Nullam lobortis, erat ac ullamcorper interdum, odio nisl elementum quam, ut malesuada massa nunc eget quam. Nam suscipit neque quis sapien ultricies imperdiet. Maecenas augue libero, finibus tristique sagittis et, semper nec arcu. Morbi non tortor ultrices, sollicitudin justo sed, accumsan ligula. Nullam at ipsum in nibh auctor ullamcorper. Nullam laoreet neque id lorem condimentum tincidunt. Nullam vel orci nibh. Ut sit amet sem faucibus, fringilla orci at, lacinia enim. Mauris imperdiet ex id scelerisque eleifend. Ut tincidunt massa nibh, viverra pharetra metus')</value> <value>materialize('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sollicitudin nisi ac erat mollis dapibus. Maecenas leo purus, bibendum eu erat eget, iaculis molestie tortor. Phasellus maximus odio nec mauris ultrices dictum. Morbi efficitur nisl eget congue mollis. Vestibulum pharetra diam vitae urna interdum, eget ultricies justo sollicitudin. Nunc sit amet purus id leo tempus dignissim. Donec ac lacus ut orci tempus scelerisque quis ultricies nibh. Nullam lobortis, erat ac ullamcorper interdum, odio nisl elementum quam, ut malesuada massa nunc eget quam. Nam suscipit neque quis sapien ultricies imperdiet. Maecenas augue libero, finibus tristique sagittis et, semper nec arcu. Morbi non tortor ultrices, sollicitudin justo sed, accumsan ligula. Nullam at ipsum in nibh auctor ullamcorper. Nullam laoreet neque id lorem condimentum tincidunt. Nullam vel orci nibh. Ut sit amet sem faucibus, fringilla orci at, lacinia enim. Mauris imperdiet ex id scelerisque eleifend. Ut tincidunt massa nibh, viverra pharetra metus')</value>
</values> </values>
</substitution> </substitution>
<substitution>
<name>table_fast</name>
<values>
<value>zeros(10000000)</value>
<value>zeros_mt(100000000)</value>
</values>
</substitution>
<substitution> <substitution>
<name>table</name> <name>table</name>
<values> <values>
@ -43,4 +55,6 @@
<query>SELECT ignore({crypto_hash_func}({string})) FROM {table} FORMAT Null</query> <query>SELECT ignore({crypto_hash_func}({string})) FROM {table} FORMAT Null</query>
<query>SELECT ignore({crypto_hash_func}({string_slow})) FROM {table_slow} FORMAT Null</query> <query>SELECT ignore({crypto_hash_func}({string_slow})) FROM {table_slow} FORMAT Null</query>
<query>SELECT ignore({hash_fast}({string})) FROM {table_fast} FORMAT Null</query>
<query>SELECT ignore({hash_fast}({string_slow})) FROM {table} FORMAT Null</query>
</test> </test>

View File

@ -1,11 +1,8 @@
<test> <test>
<create_query>CREATE TABLE t (x UInt64, d32 Decimal32(3), d64 Decimal64(4), d128 Decimal128(5)) ENGINE = Memory</create_query> <create_query>CREATE TABLE t (x UInt64, d32 Decimal32(3), d64 Decimal64(4), d128 Decimal128(5)) ENGINE = Memory</create_query>
<fill_query>INSERT INTO t SELECT number AS x, x AS d32, x AS d64, x d128 FROM numbers(1000000)</fill_query> <fill_query>INSERT INTO t SELECT number AS x, x AS d32, x AS d64, x d128 FROM numbers(10000000)</fill_query>
<drop_query>DROP TABLE IF EXISTS t</drop_query> <drop_query>DROP TABLE IF EXISTS t</drop_query>
<query>SELECT min(d32), max(d32), argMin(x, d32), argMax(x, d32) FROM t</query> <query>SELECT min(d32), max(d32), argMin(x, d32), argMax(x, d32) FROM t</query>
<query>SELECT min(d64), max(d64), argMin(x, d64), argMax(x, d64) FROM t</query> <query>SELECT min(d64), max(d64), argMin(x, d64), argMax(x, d64) FROM t</query>
<query>SELECT min(d128), max(d128), argMin(x, d128), argMax(x, d128) FROM t</query> <query>SELECT min(d128), max(d128), argMin(x, d128), argMax(x, d128) FROM t</query>

View File

@ -1,10 +1,11 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>hits_10m_single</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<settings><max_threads>1</max_threads></settings>
<!-- FIXME this should have been an EXPLAIN test, no point in measuring performance to deduce that the query was rewritten -->
<query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID DESC) ORDER BY EventDate, CounterID FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID DESC) ORDER BY EventDate, CounterID FORMAT Null</query>
<query>SELECT DISTINCT * FROM (SELECT DISTINCT CounterID, EventDate FROM hits_10m_single) FORMAT Null</query> <query>SELECT DISTINCT * FROM (SELECT DISTINCT CounterID, EventDate FROM hits_10m_single) FORMAT Null</query>
<query>SELECT DISTINCT * FROM (SELECT DISTINCT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID DESC) ORDER BY toStartOfWeek(EventDate) FORMAT Null</query> <query>SELECT DISTINCT * FROM (SELECT DISTINCT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID DESC) ORDER BY toStartOfWeek(EventDate) FORMAT Null</query>
</test> </test>

View File

@ -1,10 +1,9 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>hits_100m_single</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<settings><max_threads>1</max_threads></settings>
<!-- FIXME this should have been an EXPLAIN test -->
<query>SELECT count(JavaEnable) FROM hits_100m_single WHERE WatchID = 1 OR Title = 'next' OR URL = 'prev' OR OriginalURL = '???' OR 1</query> <query>SELECT count(JavaEnable) FROM hits_100m_single WHERE WatchID = 1 OR Title = 'next' OR URL = 'prev' OR OriginalURL = '???' OR 1</query>
</test> </test>

View File

@ -1,6 +1,4 @@
<test> <test>
<!-- gcc-8 generates 20% faster code than gcc-9 <!-- gcc-8 generates 20% faster code than gcc-9
clang-8 generates more than two times slower code than gcc clang-8 generates more than two times slower code than gcc
--> -->
@ -8,7 +6,7 @@
<create_query>CREATE TABLE empty_strings (s String) ENGINE = Log;</create_query> <create_query>CREATE TABLE empty_strings (s String) ENGINE = Log;</create_query>
<fill_query>INSERT INTO empty_strings SELECT '' FROM zeros_mt(100000000);</fill_query> <fill_query>INSERT INTO empty_strings SELECT '' FROM zeros_mt(100000000);</fill_query>
<query>SELECT count() FROM empty_strings</query> <query>SELECT count() FROM empty_strings WHERE NOT ignore(s)</query>
<drop_query>DROP TABLE IF EXISTS empty_strings</drop_query> <drop_query>DROP TABLE IF EXISTS empty_strings</drop_query>
</test> </test>

View File

@ -1,11 +1,8 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>test.hits</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<substitutions> <substitutions>
<substitution> <substitution>
<name>args</name> <name>args</name>
@ -23,5 +20,5 @@
</substitution> </substitution>
</substitutions> </substitutions>
<query>SELECT entropy({args}) FROM test.hits</query> <query>SELECT entropy({args}) FROM hits_100m_single</query>
</test> </test>

View File

@ -7,8 +7,7 @@
<table_exists>test.hits</table_exists> <table_exists>test.hits</table_exists>
</preconditions> </preconditions>
<settings><max_threads>1</max_threads></settings>
<query><![CDATA[SELECT count() FROM test.hits WHERE ClientIP6 < RemoteIP6]]></query> <query><![CDATA[SELECT count() FROM test.hits WHERE ClientIP6 < RemoteIP6]]></query>
</test> </test>

View File

@ -1,9 +1,4 @@
<test> <test>
<tags>
</tags>
<substitutions> <substitutions>
<substitution> <substitution>
<name>format</name> <name>format</name>
@ -18,5 +13,5 @@
</substitution> </substitution>
</substitutions> </substitutions>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, formatDateTime(t, '{format}'))</query> <query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, formatDateTime(t, '{format}'))</query>
</test> </test>

View File

@ -1,8 +1,6 @@
<test> <test>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(MACNumToString(number))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(MACStringToNum(MACNumToString(number)))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(MACNumToString(number))</query> <query>SELECT count() FROM zeros_mt(1000000000) WHERE NOT ignore(MACNumToString(rand64()))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(MACStringToNum(MACNumToString(number)))</query> <query>SELECT count() FROM zeros_mt(1000000000) WHERE NOT ignore(MACStringToNum(MACNumToString(rand64())))</query>
<query>SELECT count() FROM zeros_mt(10000000) WHERE NOT ignore(MACNumToString(rand64()))</query>
<query>SELECT count() FROM zeros_mt(10000000) WHERE NOT ignore(MACStringToNum(MACNumToString(rand64())))</query>
</test> </test>

View File

@ -1,21 +1,21 @@
<test> <test>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('ui64 UInt64, i64 Int64, ui32 UInt32, i32 Int32, ui16 UInt16, i16 Int16, ui8 UInt8, i8 Int8') LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('ui64 UInt64, i64 Int64, ui32 UInt32, i32 Int32, ui16 UInt16, i16 Int16, ui8 UInt8, i8 Int8') LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('ui64 UInt64, i64 Int64, ui32 UInt32, i32 Int32, ui16 UInt16, i16 Int16, ui8 UInt8, i8 Int8', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('ui64 UInt64, i64 Int64, ui32 UInt32, i32 Int32, ui16 UInt16, i16 Int16, ui8 UInt8, i8 Int8', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Enum8(\'hello\' = 1, \'world\' = 5)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Enum8(\'hello\' = 1, \'world\' = 5)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(Enum8(\'hello\' = 1, \'world\' = 5)))', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(Enum8(\'hello\' = 1, \'world\' = 5)))', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Nullable(Enum16(\'h\' = 1, \'w\' = 5 , \'o\' = -200))', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Nullable(Enum16(\'h\' = 1, \'w\' = 5 , \'o\' = -200))', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('d Date, dt DateTime, dtm DateTime(\'Europe/Moscow\')', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('d Date, dt DateTime, dtm DateTime(\'Europe/Moscow\')', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('dt64 DateTime64, dts64 DateTime64(6), dtms64 DateTime64(6 ,\'Europe/Moscow\')', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('dt64 DateTime64, dts64 DateTime64(6), dtms64 DateTime64(6 ,\'Europe/Moscow\')', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('f32 Float32, f64 Float64', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('f32 Float32, f64 Float64', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('d32 Decimal32(4), d64 Decimal64(8), d128 Decimal128(16)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('d32 Decimal32(4), d64 Decimal64(8), d128 Decimal128(16)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Tuple(Int32, Int64)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Tuple(Int32, Int64)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Int8)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Int8)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(Int32))', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(Int32))', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Tuple(Int32, Array(Int64))', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Tuple(Int32, Array(Int64))', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Nullable(String)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Nullable(String)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(String)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(String)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i UUID', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i UUID', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(UUID))', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i Array(Nullable(UUID))', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i FixedString(4)', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i FixedString(4)', 0, 10, 10) LIMIT 100000000);</query>
<query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i String', 0, 10, 10) LIMIT 10000000);</query> <query>SELECT sum(NOT ignore(*)) FROM (SELECT * FROM generateRandom('i String', 0, 10, 10) LIMIT 100000000);</query>
</test> </test>

View File

@ -1,8 +1,6 @@
<test> <test>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(rand() % 2 ? 'hello' : 'world')</query>
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(rand() % 2 ? 'hello' : '')</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : 'world')</query> <query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(rand() % 2 ? 'hello' : '')</query> <query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(rand() % 2 ? toFixedString('hello', 5) : toFixedString('world', 5))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(rand() % 2 ? '' : toFixedString('world', 5))</query>
</test> </test>

View File

@ -1,13 +1,10 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>test.hits</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<query>SELECT count() FROM test.hits WHERE NOT ignore(rand() % 2 ? URL : Referer)</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? URL : Referer)</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(rand() % 2 ? URL : '')</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? URL : '')</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(rand() % 2 ? SearchPhrase : MobilePhoneModel)</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? SearchPhrase : MobilePhoneModel)</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(rand() % 2 ? '' : PageCharset)</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(rand() % 2 ? '' : PageCharset)</query>
</test> </test>

View File

@ -1,9 +1,9 @@
<test> <test>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : 3)) FROM numbers(1000000) ]]></query> <query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : 3)) FROM numbers(10000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT any(x < 1 ? '1' : (x < 5 ? '2' : '3')) FROM numbers(1000000) ]]></query> <query><![CDATA[ WITH number AS x SELECT any(x < 1 ? '1' : (x < 5 ? '2' : '3')) FROM numbers(10000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : (x < 10 ? 3 : (x % 2 ? 4 : 5)))) FROM numbers(1000000) ]]></query> <query><![CDATA[ WITH number AS x SELECT sum(x < 1 ? 1 : (x < 5 ? 2 : (x < 10 ? 3 : (x % 2 ? 4 : 5)))) FROM numbers(10000000) ]]></query>
<query><![CDATA[ WITH number AS x SELECT any(x < 1 ? '1' : (x < 5 ? '2' : (x < 10 ? '3' : (x % 2 ? '4' : '5')))) FROM numbers(1000000) ]]></query> <query><![CDATA[ WITH number AS x SELECT any(x < 1 ? '1' : (x < 5 ? '2' : (x < 10 ? '3' : (x % 2 ? '4' : '5')))) FROM numbers(10000000) ]]></query>
<query><![CDATA[ <query><![CDATA[
WITH number AS x, x = 1 ? 1 : (x = 2 ? 2 : (x = 3 ? 3 : (x = 4 ? 4 : (x = 5 ? 5 : (x = 6 ? 6 : (x = 7 ? 7 : (x = 8 ? 8 : (x = 9 ? 9 : (x = 10 ? 10 : (x = 11 ? 11 : (x = 12 ? 12 : (x = 13 ? 13 : (x = 14 ? 14 : (x = 15 ? 15 : (x = 16 ? 16 : (x = 17 ? 17 : (x = 18 ? 18 : (x = 19 ? 19 : 20)))))))))))))))))) AS res SELECT sum(res) FROM numbers(1000000) WITH number AS x, x = 1 ? 1 : (x = 2 ? 2 : (x = 3 ? 3 : (x = 4 ? 4 : (x = 5 ? 5 : (x = 6 ? 6 : (x = 7 ? 7 : (x = 8 ? 8 : (x = 9 ? 9 : (x = 10 ? 10 : (x = 11 ? 11 : (x = 12 ? 12 : (x = 13 ? 13 : (x = 14 ? 14 : (x = 15 ? 15 : (x = 16 ? 16 : (x = 17 ? 17 : (x = 18 ? 18 : (x = 19 ? 19 : 20)))))))))))))))))) AS res SELECT sum(res) FROM numbers(10000000)
]]></query> ]]></query>
</test> </test>

View File

@ -1,8 +1,4 @@
<test> <test>
<query> <query>
WITH WITH
bitXor(number, 0x4CF2D2BAAE6DA887) AS x0, bitXor(number, 0x4CF2D2BAAE6DA887) AS x0,
@ -11,7 +7,7 @@
bitXor(x2, bitShiftRight(x2, 33)) AS x3, bitXor(x2, bitShiftRight(x2, 33)) AS x3,
x3 * 0xc4ceb9fe1a85ec53 AS x4, x3 * 0xc4ceb9fe1a85ec53 AS x4,
bitXor(x4, bitShiftRight(x4, 33)) AS x5 bitXor(x4, bitShiftRight(x4, 33)) AS x5
SELECT count() FROM numbers(10000000) WHERE NOT ignore(x5) SELECT count() FROM numbers(100000000) WHERE NOT ignore(x5)
SETTINGS SETTINGS
compile_expressions = 0 compile_expressions = 0
</query> </query>
@ -24,7 +20,7 @@
bitXor(x2, bitShiftRight(x2, 33)) AS x3, bitXor(x2, bitShiftRight(x2, 33)) AS x3,
x3 * 0xc4ceb9fe1a85ec53 AS x4, x3 * 0xc4ceb9fe1a85ec53 AS x4,
bitXor(x4, bitShiftRight(x4, 33)) AS x5 bitXor(x4, bitShiftRight(x4, 33)) AS x5
SELECT count() FROM numbers(10000000) WHERE NOT ignore(x5) SELECT count() FROM numbers(100000000) WHERE NOT ignore(x5)
SETTINGS SETTINGS
compile_expressions = 1, compile_expressions = 1,
min_count_to_compile_expression = 1 min_count_to_compile_expression = 1
@ -32,6 +28,6 @@
<!-- The same expression written as ClickHouse builtin function. --> <!-- The same expression written as ClickHouse builtin function. -->
<query> <query>
SELECT count() FROM numbers(10000000) WHERE NOT ignore(intHash64(number)) SELECT count() FROM numbers(100000000) WHERE NOT ignore(intHash64(number))
</query> </query>
</test> </test>

View File

@ -7,30 +7,30 @@
<fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query> <fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query> <fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<query tag='ANY LEFT'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='ANY LEFT'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='ANY LEFT KEY'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='ANY LEFT KEY'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='ANY LEFT ON'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='ANY LEFT ON'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='ANY LEFT IN'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='ANY LEFT IN'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='INNER'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='INNER'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='INNER KEY'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='INNER KEY'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='INNER ON'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='INNER ON'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='INNER IN'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='INNER IN'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='LEFT'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='LEFT'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='LEFT KEY'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='LEFT KEY'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='LEFT ON'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='LEFT ON'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='LEFT IN'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='LEFT IN'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='RIGHT'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='RIGHT'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='RIGHT KEY'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='RIGHT KEY'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='RIGHT ON'>SELECT COUNT() FROM ints l RIGHT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='RIGHT ON'>SELECT COUNT() FROM ints l RIGHT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='RIGHT IN'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='RIGHT IN'>SELECT COUNT() FROM ints l RIGHT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='FULL'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='FULL'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='FULL KEY'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='FULL KEY'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='FULL ON'>SELECT COUNT() FROM ints l FULL JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='FULL ON'>SELECT COUNT() FROM ints l FULL JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='FULL IN'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='FULL IN'>SELECT COUNT() FROM ints l FULL JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='CROSS'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query> <query tag='CROSS'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query>
<query tag='CROSS KEY'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query> <query tag='CROSS KEY'>SELECT COUNT() FROM ints l CROSS JOIN (SELECT number as i64 FROM numbers(4)) r WHERE i32 = 42</query>

View File

@ -1,42 +1,42 @@
<test> <test max_ignored_relative_change="0.2">
<create_query>CREATE TABLE ints (i64 Int64, i32 Int32, i16 Int16, i8 Int8) ENGINE = Memory</create_query> <create_query>CREATE TABLE ints (i64 Int64, i32 Int32, i16 Int16, i8 Int8) ENGINE = Memory</create_query>
<create_query>SET join_algorithm = 'partial_merge'</create_query> <create_query>SET join_algorithm = 'partial_merge'</create_query>
<fill_query>INSERT INTO ints SELECT number AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(5000)</fill_query> <fill_query>INSERT INTO ints SELECT number AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 10000 + number % 1000 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(5000)</fill_query> <fill_query>INSERT INTO ints SELECT 10000 + number % 1000 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 20000 + number % 100 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(5000)</fill_query> <fill_query>INSERT INTO ints SELECT 20000 + number % 100 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(5000)</fill_query> <fill_query>INSERT INTO ints SELECT 30000 + number % 10 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(5000)</fill_query> <fill_query>INSERT INTO ints SELECT 40000 + number % 1 AS i64, i64 AS i32, i64 AS i16, i64 AS i8 FROM numbers(10000)</fill_query>
<query tag='ANY LEFT'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='ANY LEFT'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='ANY LEFT KEY'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='ANY LEFT KEY'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='ANY LEFT ON'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='ANY LEFT ON'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='ANY LEFT IN'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='ANY LEFT IN'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='INNER'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='INNER'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='INNER KEY'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='INNER KEY'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='INNER ON'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='INNER ON'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='INNER IN'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='INNER IN'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='LEFT'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 200042</query> <query tag='LEFT'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 20042</query>
<query tag='LEFT KEY'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042</query> <query tag='LEFT KEY'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042</query>
<query tag='LEFT ON'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042</query> <query tag='LEFT ON'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042</query>
<query tag='LEFT IN'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042)</query> <query tag='LEFT IN'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042)</query>
<query tag='ANY LEFT (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='ANY LEFT (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='ANY LEFT KEY (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='ANY LEFT KEY (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='ANY LEFT ON (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='ANY LEFT ON (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='ANY LEFT IN (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042) SETTINGS partial_merge_join_optimizations = 0</query> <query tag='ANY LEFT IN (noopt)'>SELECT COUNT() FROM ints l ANY LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042) SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='INNER (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='INNER (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='INNER KEY (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='INNER KEY (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='INNER ON (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='INNER ON (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='INNER IN (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042) SETTINGS partial_merge_join_optimizations = 0</query> <query tag='INNER IN (noopt)'>SELECT COUNT() FROM ints l INNER JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042) SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='LEFT (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='LEFT (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='LEFT KEY (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='LEFT KEY (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64,i32,i16,i8 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='LEFT ON (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 200042 SETTINGS partial_merge_join_optimizations = 0</query> <query tag='LEFT ON (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r ON l.i64 = r.i64 WHERE i32 = 20042 SETTINGS partial_merge_join_optimizations = 0</query>
<query tag='LEFT IN (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 100042, 200042, 300042, 400042) SETTINGS partial_merge_join_optimizations = 0</query> <query tag='LEFT IN (noopt)'>SELECT COUNT() FROM ints l LEFT JOIN ints r USING i64 WHERE i32 IN(42, 10042, 20042, 30042, 40042) SETTINGS partial_merge_join_optimizations = 0</query>
<drop_query>DROP TABLE IF EXISTS ints</drop_query> <drop_query>DROP TABLE IF EXISTS ints</drop_query>
</test> </test>

View File

@ -1,9 +1,9 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>test.hits</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<query>SELECT count() FROM test.hits WHERE NOT ignore(least(URL, Referer))</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(least(URL, Referer))</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(greatest(URL, Referer, Title))</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(greatest(URL, Referer, Title))</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(greatest(ClientIP, RemoteIP))</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(greatest(ClientIP, RemoteIP))</query>
</test> </test>

View File

@ -2,6 +2,7 @@
<preconditions> <preconditions>
<table_exists>hits_100m_single</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<settings><max_threads>1</max_threads></settings>
<query><![CDATA[SELECT max(length(MobilePhoneModel)) FROM hits_100m_single]]></query> <query><![CDATA[SELECT max(length(MobilePhoneModel)) FROM hits_100m_single]]></query>
<query><![CDATA[SELECT max(length(Params)) FROM hits_100m_single]]></query> <query><![CDATA[SELECT max(length(Params)) FROM hits_100m_single]]></query>

View File

@ -1,6 +1,4 @@
<test> <test>
<create_query> <create_query>
CREATE TABLE huge_pk ENGINE = MergeTree ORDER BY ( CREATE TABLE huge_pk ENGINE = MergeTree ORDER BY (
c001, c002, c003, c004, c005, c006, c007, c008, c009, c010, c011, c012, c013, c014, c015, c016, c017, c018, c019, c020, c001, c002, c003, c004, c005, c006, c007, c008, c009, c010, c011, c012, c013, c014, c015, c016, c017, c018, c019, c020,
@ -185,11 +183,11 @@
</create_query> </create_query>
<!-- some queries with PK conditions --> <!-- some queries with PK conditions -->
<query><![CDATA[SELECT count() FROM huge_pk WHERE c001 > 10]]></query> <query short="1"><![CDATA[SELECT count() FROM huge_pk WHERE c001 > 10]]></query>
<query><![CDATA[SELECT count() FROM huge_pk WHERE c001 in (2,3) and c400 in (10,0) and c100 < 2]]></query> <query short="1"><![CDATA[SELECT count() FROM huge_pk WHERE c001 in (2,3) and c400 in (10,0) and c100 < 2]]></query>
<query><![CDATA[SELECT count() FROM huge_pk WHERE c700 > 10]]></query> <query short="1"><![CDATA[SELECT count() FROM huge_pk WHERE c700 > 10]]></query>
<!-- column c701 is not in PK--> <!-- column c701 is not in PK-->
<query><![CDATA[SELECT count() FROM huge_pk WHERE c701 > 10]]></query> <query short="1"><![CDATA[SELECT count() FROM huge_pk WHERE c701 > 10]]></query>
<drop_query>DROP TABLE IF EXISTS huge_pk</drop_query> <drop_query>DROP TABLE IF EXISTS huge_pk</drop_query>
</test> </test>

View File

@ -1,15 +1,12 @@
<test> <test>
<create_query>CREATE TABLE bad_partitions (x UInt64) ENGINE = MergeTree PARTITION BY x ORDER BY x</create_query> <create_query>CREATE TABLE bad_partitions (x UInt64) ENGINE = MergeTree PARTITION BY x ORDER BY x</create_query>
<fill_query>INSERT INTO bad_partitions SELECT * FROM numbers(10000)</fill_query> <fill_query>INSERT INTO bad_partitions SELECT * FROM numbers(10000)</fill_query>
<settings> <settings>
<max_partitions_per_insert_block>0</max_partitions_per_insert_block> <max_partitions_per_insert_block>0</max_partitions_per_insert_block>
</settings> </settings>
<query>SELECT count() FROM bad_partitions</query> <query short="1">SELECT count() FROM bad_partitions</query>
<drop_query>DROP TABLE IF EXISTS bad_partitions</drop_query> <drop_query>DROP TABLE IF EXISTS bad_partitions</drop_query>
</test> </test>

View File

@ -1,12 +1,9 @@
<test> <test>
<create_query>CREATE TABLE simple_mergetree (EventDate Date, x UInt64) ENGINE = MergeTree ORDER BY x</create_query> <create_query>CREATE TABLE simple_mergetree (EventDate Date, x UInt64) ENGINE = MergeTree ORDER BY x</create_query>
<fill_query>INSERT INTO simple_mergetree SELECT number, today() + intDiv(number, 10000000) FROM numbers_mt(100000000)</fill_query> <fill_query>INSERT INTO simple_mergetree SELECT number, today() + intDiv(number, 10000000) FROM numbers_mt(100000000)</fill_query>
<fill_query>OPTIMIZE TABLE simple_mergetree FINAL</fill_query> <fill_query>OPTIMIZE TABLE simple_mergetree FINAL</fill_query>
<query>SELECT count() FROM simple_mergetree</query> <query short="1">SELECT count() FROM simple_mergetree</query>
<drop_query>DROP TABLE IF EXISTS simple_mergetree</drop_query> <drop_query>DROP TABLE IF EXISTS simple_mergetree</drop_query>
</test> </test>

View File

@ -12,7 +12,7 @@
<query>SELECT number AS n FROM numbers_mt(200000000) ORDER BY n DESC LIMIT 10000 FORMAT Null</query> <query>SELECT number AS n FROM numbers_mt(200000000) ORDER BY n DESC LIMIT 10000 FORMAT Null</query>
<query>SELECT number AS n FROM numbers_mt(200000000) ORDER BY n DESC LIMIT 65535 settings max_block_size = 65536 FORMAT Null</query> <query>SELECT number AS n FROM numbers_mt(200000000) ORDER BY n DESC LIMIT 65535 settings max_block_size = 65536 FORMAT Null</query>
<query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 10 FORMAT Null</query> <query>SELECT intHash64(number) AS n FROM numbers_mt(500000000) ORDER BY n LIMIT 10 FORMAT Null</query>
<query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 100 FORMAT Null</query> <query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 100 FORMAT Null</query>
<query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 1500 FORMAT Null</query> <query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 1500 FORMAT Null</query>
<query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 3000 FORMAT Null</query> <query>SELECT intHash64(number) AS n FROM numbers_mt(200000000) ORDER BY n LIMIT 3000 FORMAT Null</query>

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,6 @@
<test> <test>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomFixedString(10))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomFixedString(100))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomFixedString(10))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomFixedString(100))</query>
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomFixedString(1000))</query> <query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomFixedString(1000))</query>
<query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomFixedString(10000))</query> <query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomFixedString(10000))</query>
</test> </test>

View File

@ -1,9 +1,6 @@
<test> <test>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomPrintableASCII(10))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomPrintableASCII(100))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomPrintableASCII(10))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomPrintableASCII(100))</query>
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomPrintableASCII(1000))</query> <query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomPrintableASCII(1000))</query>
<query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomPrintableASCII(10000))</query> <query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomPrintableASCII(10000))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomPrintableASCII(rand() % 10))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomPrintableASCII(rand() % 10))</query>

View File

@ -1,9 +1,6 @@
<test> <test>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(10))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(100))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(10))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(100))</query>
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomString(1000))</query> <query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomString(1000))</query>
<query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomString(10000))</query> <query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomString(10000))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 10))</query> <query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 10))</query>

View File

@ -1,22 +1,19 @@
<test> <test>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(round(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(roundBankers(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(floor(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(ceil(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(trunc(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(round(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(roundBankers(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(floor(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(ceil(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(trunc(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(round(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(round(toInt64(number), -2))</query> <query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(roundBankers(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(roundBankers(toInt64(number), -2))</query> <query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(floor(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(floor(toInt64(number), -2))</query> <query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(ceil(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(ceil(toInt64(number), -2))</query> <query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(trunc(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(trunc(toInt64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(round(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(roundBankers(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(floor(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(ceil(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(trunc(toFloat64(number), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(round(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(roundBankers(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(floor(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(ceil(toDecimal128(number, 0), -2))</query>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(trunc(toDecimal128(number, 0), -2))</query>
</test> </test>

View File

@ -3,14 +3,14 @@
<fill_query>INSERT INTO test_in SELECT number FROM numbers(500000000)</fill_query> <fill_query>INSERT INTO test_in SELECT number FROM numbers(500000000)</fill_query>
<!-- IN is used at index analysis --> <!-- IN is used at index analysis -->
<query>SELECT count() FROM test_in WHERE a IN (SELECT rand(1) FROM numbers(100000)) SETTINGS max_rows_to_read = 1, read_overflow_mode = 'break'</query> <query>SELECT count() FROM test_in WHERE a IN (SELECT rand(1) FROM numbers(200000)) SETTINGS max_rows_to_read = 1, read_overflow_mode = 'break'</query>
<query>SELECT count() FROM test_in WHERE toInt64(a) IN (SELECT toInt64(rand(1)) FROM numbers(100000)) settings max_rows_to_read=1, read_overflow_mode='break'</query> <query>SELECT count() FROM test_in WHERE toInt64(a) IN (SELECT toInt64(rand(1)) FROM numbers(200000)) settings max_rows_to_read=1, read_overflow_mode='break'</query>
<!-- Analyze only one range --> <!-- Analyze only one range -->
<query>SELECT count() FROM test_in WHERE -toInt64(a) IN (SELECT toInt64(rand(1)) FROM numbers(100000)) settings max_rows_to_read=1, read_overflow_mode='break'</query> <query>SELECT count() FROM test_in WHERE -toInt64(a) IN (SELECT toInt64(rand(1)) FROM numbers(200000)) settings max_rows_to_read=1, read_overflow_mode='break'</query>
<!-- Analyze all ranges --> <!-- Analyze all ranges. The query is short because nothing is selected. -->
<query>SELECT count() FROM test_in WHERE -toInt64(a) NOT IN (SELECT toInt64(rand(1)) FROM numbers(100000)) settings max_rows_to_read=1, read_overflow_mode='break'</query> <query short="1">SELECT count() FROM test_in WHERE -toInt64(a) NOT IN (SELECT toInt64(rand(1)) FROM numbers(200000)) settings max_rows_to_read=1, read_overflow_mode='break'</query>
<!-- <!--
Test with explicitly defined large set (10000 elemnets). Test with explicitly defined large set (10000 elemnets).

View File

@ -1,11 +1,8 @@
<test> <test>
<preconditions> <preconditions>
<table_exists>test.hits</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<query>SELECT count() FROM test.hits WHERE NOT ignore(substring(URL, 10, 20))</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(substring(URL, 10, 20))</query>
<query>SELECT count() FROM test.hits WHERE NOT ignore(substring(PageCharset, 1, 2))</query> <query>SELECT count() FROM hits_100m_single WHERE NOT ignore(substring(PageCharset, 1, 2))</query>
</test> </test>

View File

@ -4,8 +4,6 @@
<table_exists>hits_100m_single</table_exists> <table_exists>hits_100m_single</table_exists>
</preconditions> </preconditions>
<substitutions> <substitutions>
<substitution> <substitution>
<name>str1</name> <name>str1</name>
@ -37,19 +35,19 @@
<query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 2000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 2000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 5000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 5000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 10000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 10000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1} LIMIT 65535 format Null settings max_block_size = 65536]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 65535 format Null settings max_block_size = 65536]]></query>
<query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 10 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 10 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 300 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 300 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1}, CounterID LIMIT 1500 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 1500 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1}, CounterID LIMIT 2000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 2000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1}, CounterID LIMIT 5000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 5000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1}, CounterID LIMIT 10000 format Null]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 10000 format Null]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1}, CounterID LIMIT 65535 format Null settings max_block_size = 65536]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1}, CounterID LIMIT 65535 format Null settings max_block_size = 65536]]></query>
<query><![CDATA[SELECT {str1} FROM hits_10m_single ORDER BY {str1} LIMIT 9000000, 10]]></query> <query><![CDATA[SELECT {str1} FROM hits_100m_single ORDER BY {str1} LIMIT 9000000, 10]]></query>
<query><![CDATA[SELECT {str1}, {str2} FROM hits_100m_single ORDER BY {str1}, {str2} LIMIT 10]]></query> <query><![CDATA[SELECT {str1}, {str2} FROM hits_100m_single ORDER BY {str1}, {str2} LIMIT 10]]></query>
<query><![CDATA[SELECT {str1}, {str2} FROM hits_10m_single ORDER BY {str1}, {str2} LIMIT 9000000, 10]]></query> <query><![CDATA[SELECT {str1}, {str2} FROM hits_100m_single ORDER BY {str1}, {str2} LIMIT 9000000, 10]]></query>
</test> </test>

View File

@ -19,14 +19,14 @@
</substitution> </substitution>
</substitutions> </substitutions>
<query>SELECT count() FROM {table}</query> <query short="1">SELECT count() FROM {table}</query>
<query>SELECT count() FROM hits_10m_single WHERE AdvEngineID != 0</query> <query short="1">SELECT count() FROM hits_10m_single WHERE AdvEngineID != 0</query>
<query>SELECT sum(AdvEngineID), count(), avg(ResolutionWidth) FROM {table}</query> <query short="1">SELECT sum(AdvEngineID), count(), avg(ResolutionWidth) FROM {table}</query>
<query>SELECT sum(UserID) FROM {table}</query> <query short="1">SELECT sum(UserID) FROM {table}</query>
<query>SELECT uniq(UserID) FROM {table} FORMAT Null</query> <query>SELECT uniq(UserID) FROM {table} FORMAT Null</query>
<query>SELECT uniq(SearchPhrase) FROM {table} FORMAT Null</query> <query>SELECT uniq(SearchPhrase) FROM {table} FORMAT Null</query>
<query>SELECT min(EventDate), max(EventDate) FROM {table}</query> <query short="1">SELECT min(EventDate), max(EventDate) FROM {table}</query>
<query>SELECT AdvEngineID, count() FROM hits_10m_single WHERE AdvEngineID != 0 GROUP BY AdvEngineID ORDER BY count() DESC LIMIT 10</query> <query>SELECT AdvEngineID, count() FROM hits_100m_single WHERE AdvEngineID != 0 GROUP BY AdvEngineID ORDER BY count() DESC LIMIT 10</query>
<query>SELECT RegionID, uniq(UserID) AS u FROM {table} GROUP BY RegionID ORDER BY u DESC LIMIT 10</query> <query>SELECT RegionID, uniq(UserID) AS u FROM {table} GROUP BY RegionID ORDER BY u DESC LIMIT 10</query>
<query>SELECT RegionID, sum(AdvEngineID), count() AS c, avg(ResolutionWidth), uniq(UserID) FROM {table} GROUP BY RegionID ORDER BY c DESC LIMIT 10</query> <query>SELECT RegionID, sum(AdvEngineID), count() AS c, avg(ResolutionWidth), uniq(UserID) FROM {table} GROUP BY RegionID ORDER BY c DESC LIMIT 10</query>
<query>SELECT MobilePhoneModel, uniq(UserID) AS u FROM hits_100m_single WHERE MobilePhoneModel != '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10</query> <query>SELECT MobilePhoneModel, uniq(UserID) AS u FROM hits_100m_single WHERE MobilePhoneModel != '' GROUP BY MobilePhoneModel ORDER BY u DESC LIMIT 10</query>
@ -38,7 +38,7 @@
<query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase ORDER BY count() DESC LIMIT 10</query> <query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase ORDER BY count() DESC LIMIT 10</query>
<query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase LIMIT 10</query> <query>SELECT UserID, SearchPhrase, count() FROM {table} GROUP BY UserID, SearchPhrase LIMIT 10</query>
<query>SELECT UserID, toMinute(EventTime) AS m, SearchPhrase, count() FROM {table} GROUP BY UserID, m, SearchPhrase ORDER BY count() DESC LIMIT 10</query> <query>SELECT UserID, toMinute(EventTime) AS m, SearchPhrase, count() FROM {table} GROUP BY UserID, m, SearchPhrase ORDER BY count() DESC LIMIT 10</query>
<query>SELECT count() FROM hits_10m_single WHERE UserID = 12345678901234567890</query> <query>SELECT count() FROM hits_100m_single WHERE UserID = 12345678901234567890</query>
<query>SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%'</query> <query>SELECT count() FROM hits_100m_single WHERE URL LIKE '%metrika%'</query>
<query>SELECT SearchPhrase, any(URL), count() AS c FROM hits_100m_single WHERE URL LIKE '%metrika%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query> <query>SELECT SearchPhrase, any(URL), count() AS c FROM hits_100m_single WHERE URL LIKE '%metrika%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
<query>SELECT SearchPhrase, any(URL), any(Title), count() AS c, uniq(UserID) FROM {table} WHERE Title LIKE '%Яндекс%' AND URL NOT LIKE '%.yandex.%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query> <query>SELECT SearchPhrase, any(URL), any(Title), count() AS c, uniq(UserID) FROM {table} WHERE Title LIKE '%Яндекс%' AND URL NOT LIKE '%.yandex.%' AND SearchPhrase != '' GROUP BY SearchPhrase ORDER BY c DESC LIMIT 10</query>
@ -59,8 +59,8 @@
<query>SELECT Title, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT DontCountHits AND NOT Refresh AND notEmpty(Title) GROUP BY Title ORDER BY PageViews DESC LIMIT 10</query> <query>SELECT Title, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT DontCountHits AND NOT Refresh AND notEmpty(Title) GROUP BY Title ORDER BY PageViews DESC LIMIT 10</query>
<query>SELECT URL, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND IsLink AND NOT IsDownload GROUP BY URL ORDER BY PageViews DESC LIMIT 1000</query> <query>SELECT URL, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND IsLink AND NOT IsDownload GROUP BY URL ORDER BY PageViews DESC LIMIT 1000</query>
<query>SELECT TraficSourceID, SearchEngineID, AdvEngineID, ((SearchEngineID = 0 AND AdvEngineID = 0) ? Referer : '') AS Src, URL AS Dst, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 1000</query> <query>SELECT TraficSourceID, SearchEngineID, AdvEngineID, ((SearchEngineID = 0 AND AdvEngineID = 0) ? Referer : '') AS Src, URL AS Dst, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh GROUP BY TraficSourceID, SearchEngineID, AdvEngineID, Src, Dst ORDER BY PageViews DESC LIMIT 1000</query>
<query>SELECT URLHash, EventDate, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND TraficSourceID IN (-1, 6) AND RefererHash = halfMD5('http://example.ru/') GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 100</query> <query short="1">SELECT URLHash, EventDate, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND TraficSourceID IN (-1, 6) AND RefererHash = halfMD5('http://example.ru/') GROUP BY URLHash, EventDate ORDER BY PageViews DESC LIMIT 100</query>
<query>SELECT WindowClientWidth, WindowClientHeight, count() AS PageViews FROM hits_100m_single WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND NOT DontCountHits AND URLHash = halfMD5('http://example.ru/') GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10000 FORMAT Null</query> <query short="1">SELECT WindowClientWidth, WindowClientHeight, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-31' AND NOT Refresh AND NOT DontCountHits AND URLHash = halfMD5('http://example.ru/') GROUP BY WindowClientWidth, WindowClientHeight ORDER BY PageViews DESC LIMIT 10000 FORMAT Null</query>
<query>SELECT toStartOfMinute(EventTime) AS Minute, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-02' AND NOT Refresh AND NOT DontCountHits GROUP BY Minute ORDER BY Minute FORMAT Null</query> <query short="1">SELECT toStartOfMinute(EventTime) AS Minute, count() AS PageViews FROM {table} WHERE CounterID = 34 AND EventDate >= '2013-07-01' AND EventDate &lt;= '2013-07-02' AND NOT Refresh AND NOT DontCountHits GROUP BY Minute ORDER BY Minute FORMAT Null</query>
</test> </test>