ClickHouse/tests/performance/order_by_tuple.xml
Amos Bird faee95b897
Make ORDER BY tuple almost as fast as ORDER BY columns
We have special optimizations for multiple column ORDER BY: https://github.com/ClickHouse/ClickHouse/pull/10831 . It's beneficial to also apply to tuple columns.

Before:

select * from numbers(300000000) order by (1 - number , number + 1 , number) limit 10;
2.613 sec.

After:

select * from numbers(300000000) order by (1 - number , number + 1 , number) limit 10;
0.755 sec

No tuple:

select * from numbers(300000000) order by 1 - number , number + 1 , number limit 10;
0.755 sec
2022-01-27 21:42:08 +08:00

9 lines
202 B
XML

<test>
<tags>
<tag>sorting</tag>
<tag>comparison</tag>
</tags>
<query>select * from numbers(300000000) order by (1 - number , number + 1 , number) limit 10;</query>
</test>