hits_100m_single CREATE TABLE jit_test_memory ( key UInt64, value_1 UInt64, value_2 UInt64, value_3 UInt64, value_4 UInt64, value_5 UInt64 ) Engine = Memory CREATE TABLE jit_test_merge_tree ( key UInt64, value_1 UInt64, value_2 UInt64, value_3 UInt64, value_4 UInt64, value_5 UInt64 ) Engine = MergeTree ORDER BY key CREATE TABLE jit_test_memory_nullable ( key UInt64, value_1 Nullable(UInt64), value_2 Nullable(UInt64), value_3 Nullable(UInt64), value_4 Nullable(UInt64), value_5 Nullable(UInt64) ) Engine = Memory CREATE TABLE jit_test_merge_tree_nullable ( key UInt64, value_1 Nullable(UInt64), value_2 Nullable(UInt64), value_3 Nullable(UInt64), value_4 Nullable(UInt64), value_5 Nullable(UInt64) ) Engine = MergeTree ORDER BY key table jit_test_memory jit_test_merge_tree jit_test_memory_nullable jit_test_merge_tree_nullable INSERT INTO {table} SELECT number, rand64(0), rand64(1), rand64(2), rand64(3), rand64(4) FROM system.numbers_mt LIMIT 10000000 SELECT * FROM {table} ORDER BY value_1 ASC FORMAT Null SELECT * FROM {table} ORDER BY value_1 ASC, value_2 DESC, value_3 ASC FORMAT Null SELECT * FROM {table} ORDER BY value_1 ASC, value_2 DESC, value_3 ASC, value_4 DESC, value_5 ASC FORMAT Null SELECT WatchID FROM hits_100m_single ORDER BY WatchID ASC, CounterID DESC, ClientIP ASC LIMIT 2000000 FORMAT Null SELECT WatchID FROM hits_100m_single ORDER BY WatchID ASC, CounterID DESC, ClientIP ASC, IPNetworkID DESC, SearchEngineID ASC LIMIT 2000000 FORMAT Null DROP TABLE IF EXISTS {table}