mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Faster performance test
This commit is contained in:
parent
f6d745de7f
commit
1b7954cbae
@ -19,44 +19,44 @@
|
||||
Мы запускаем этот запрос и наблюдаем, с какой скоростью он выполняется. Через несколько секунд, когда скорость стабилизируется, прерываем выполнение.
|
||||
В качестве скорости выполнения запроса указывается количество обработанных исходных (прочитанных из таблицы) данных в единицу времени.
|
||||
Например, в таблице numbers читаемые нами данные - это числа типа UInt64 (8 байт). Если мы обрабатываем миллиард таких чисел в секунду, то отобразится скорость - 8 GB/sec. -->
|
||||
<query>SELECT count() FROM zeros(100000000) WHERE NOT ignore(rand())</query>
|
||||
<query>SELECT count() FROM zeros_mt(1600000000) WHERE NOT ignore(rand())</query>
|
||||
<query>SELECT count() FROM zeros( 10000000) WHERE NOT ignore(rand())</query>
|
||||
<query>SELECT count() FROM zeros_mt(160000000) WHERE NOT ignore(rand())</query>
|
||||
<!-- 10. Некриптографическая хэш-функция для целых чисел 64bit -> 64bit. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(intHash64(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(intHash64(number))</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(intHash64(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(intHash64(number))</query>
|
||||
<!-- 11. Некриптографическая хэш-функция для целых чисел 64bit -> 32bit. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(intHash32(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(intHash32(number))</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(intHash32(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(intHash32(number))</query>
|
||||
<!-- 12. Преобразование целого числа в строку в десятичном виде. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toString(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(toString(number))</query>
|
||||
<query>SELECT count() FROM numbers( 1000000) WHERE NOT ignore(toString(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(16000000) WHERE NOT ignore(toString(number))</query>
|
||||
<!-- 13. Преобразование целого числа в строку путём копирования куска памяти. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(reinterpretAsString(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(reinterpretAsString(number))</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(reinterpretAsString(number))</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(reinterpretAsString(number))</query>
|
||||
<!-- 26. Целочисленное деление на константу. Используется библиотека libdivide. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(number / 7)</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number / 7)</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(number / 7)</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(number / 7)</query>
|
||||
<!-- 27. Целочисленное деление на константу. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(number % 7)</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number % 7)</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(number % 7)</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(number % 7)</query>
|
||||
<!-- 28. Целочисленное деление на константу. -->
|
||||
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(number % 34908756)</query>
|
||||
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number % 34908756)</query>
|
||||
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(number % 34908756)</query>
|
||||
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(number % 34908756)</query>
|
||||
<!-- 29. Lookup-таблица, помещающаяся в L2-кэш. -->
|
||||
<query>SELECT number % 1000 AS k, count() FROM numbers(100000000) GROUP BY k</query>
|
||||
<query>SELECT number % 1000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query>
|
||||
<query>SELECT number % 1000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
|
||||
<query>SELECT number % 1000 AS k, count() FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
|
||||
<!-- 30. Хэш-таблица, помещающаяся в L3-кэш. -->
|
||||
<query>SELECT number % 100000 AS k, count() FROM numbers(100000000) GROUP BY k</query>
|
||||
<query>SELECT number % 100000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query>
|
||||
<query>SELECT number % 100000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
|
||||
<query>SELECT number % 100000 AS k, count() FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
|
||||
<!-- 31. Хэш-таблица, наверное помещающаяся в L3-кэш. -->
|
||||
<query>SELECT number % 1000000 AS k, count() FROM numbers(100000000) GROUP BY k</query>
|
||||
<query>SELECT number % 1000000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query>
|
||||
<query>SELECT number % 1000000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
|
||||
<query>SELECT number % 1000000 AS k, count() FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
|
||||
<!-- 32. Хэш-таблица, не помещающаяся в L3-кэш. -->
|
||||
<query>SELECT number % 10000000 AS k, count() FROM numbers(100000000) GROUP BY k</query>
|
||||
<query>SELECT number % 10000000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query>
|
||||
<query>SELECT number % 10000000 AS k, count() FROM numbers( 100000000) GROUP BY k FORMAT Null</query>
|
||||
<query>SELECT number % 10000000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
|
||||
<!-- 33. Хэш-таблица, требующая кучу оперативки. Возможны интересные эффекты. -->
|
||||
<query>SELECT number % 500000000 AS k, count() FROM numbers(100000000) GROUP BY k</query>
|
||||
<query>SELECT number % 500000000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query>
|
||||
<query>SELECT number % 500000000 AS k, count() FROM numbers( 1000000000) GROUP BY k FORMAT Null</query>
|
||||
<query>SELECT number % 500000000 AS k, count() FROM numbers_mt(16000000000) GROUP BY k FORMAT Null</query>
|
||||
<!-- 35. Кэш-промахи, осуществляемые из многих процессорных ядер. -->
|
||||
<!-- <query>SELECT number % (intDiv(100000000, {THREADS})) AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query> -->
|
||||
<!-- 46. Запрос, требующий много бесполезных копирований. -->
|
||||
|
Loading…
Reference in New Issue
Block a user