mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
45 lines
909 B
SQL
45 lines
909 B
SQL
SET join_algorithm = 'hash';
|
|
|
|
SELECT number as n, j FROM numbers(4) nums
|
|
ANY LEFT JOIN (
|
|
SELECT number * 2 AS n, number + 10 AS j
|
|
FROM numbers(4000)
|
|
) js2
|
|
USING n;
|
|
|
|
SET max_rows_in_join = 1000;
|
|
|
|
SELECT number as n, j FROM numbers(4) nums
|
|
ANY LEFT JOIN (
|
|
SELECT number * 2 AS n, number + 10 AS j
|
|
FROM numbers(4000)
|
|
) js2
|
|
USING n; -- { serverError 191 }
|
|
|
|
SET join_algorithm = 'partial_merge';
|
|
|
|
SELECT number as n, j FROM numbers(4) nums
|
|
ANY LEFT JOIN (
|
|
SELECT number * 2 AS n, number + 10 AS j
|
|
FROM numbers(4000)
|
|
) js2
|
|
USING n;
|
|
|
|
SET partial_merge_join_optimizations = 1;
|
|
|
|
SELECT number as n, j FROM numbers(4) nums
|
|
ANY LEFT JOIN (
|
|
SELECT number * 2 AS n, number + 10 AS j
|
|
FROM numbers(4000)
|
|
) js2
|
|
USING n;
|
|
|
|
SET join_algorithm = 'auto';
|
|
|
|
SELECT number as n, j FROM numbers(4) nums
|
|
ANY LEFT JOIN (
|
|
SELECT number * 2 AS n, number + 10 AS j
|
|
FROM numbers(4000)
|
|
) js2
|
|
USING n;
|