Commit Graph

288 Commits

Author SHA1 Message Date
Azat Khuzhin
bdb39a6fef Change logic of automatic ORDER/GROUP BY to be based on available memory
- remove max_bytes_ratio_before_external_{order,group_by}_for_server
- change the way max_bytes_ratio_before_external_{order,group_by} works

Note, that it is not enough to transform ratio to bytes in
executeQuery(), since in this case it will not work for merges and
internal queries, plus, you have to reset them for Distributed engine
and update it for Merge/View/...

This patch also introduce some helpers (see MemoryTrackerUtils) and
adjust Aggregator::Params constructor to accept Settings object instead
of tons of arguments.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-28 16:01:53 +01:00
Azat Khuzhin
909eef401a Implement max_bytes_ratio_before_external_sort_for_server
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-28 16:01:53 +01:00
Azat Khuzhin
d5a990346c Implement max_bytes_ratio_before_external_group_by_for_server
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-28 16:01:53 +01:00
Azat Khuzhin
378b6c80a6 Automatic ORDER BY to disk (max_bytes_ratio_before_external_sort)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-28 16:01:53 +01:00
Azat Khuzhin
a856c30c7c Automatic GROUP BY to disk (max_bytes_ratio_before_external_group_by)
Simpler then max_bytes_before_external_group_by, that allows you not to
think about memory consumption of the query, and can be set globally to
i.e. 0.5 so that the external aggregation will be enabled once the
memory usage reaches the 50%.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-11-28 16:01:53 +01:00
Nikita Taranov
856f73a7c2
Fix typo in intersect.md 2024-11-25 12:40:34 +01:00
Blargian
af8d7c0b60 fix style 2024-11-14 23:14:41 +01:00
Blargian
1926f6ca4a clean up EXCEPT clause page and add an example of EXCEPT() 2024-11-14 23:09:49 +01:00
Mikhail Artemenko
27efa29684 update docs 2024-11-05 18:04:59 +00:00
Patrick Druley
b9b905089d minor typo fix for example intersect SQL 2024-10-07 14:42:20 -04:00
Robert Schulze
c5f8802ac8
Docs: Mention FROM-before-SELECT 2024-09-09 08:05:18 +00:00
lgbo-ustc
bd4d648f63 update doc 2024-08-07 15:15:32 +08:00
vdimir
81723dbd01
Merge branch 'master' into vdimir/full_sorting_join_improvements 2024-07-01 10:27:11 +00:00
Blargian
d851fa871f Fix broken links in docs 2024-06-12 14:09:37 +02:00
vdimir
3e9090cbeb
fix 2024-06-12 08:45:39 +00:00
Blargian
ce26c4f657 Review changes and replace … with ... 2024-05-23 13:54:45 +02:00
vdimir
d3f03e9c94
More details about allow_experimental_join_condition 2024-05-14 08:57:56 +00:00
Maksim Kita
5885f4263b Recursive CTE documentation fix 2024-05-08 17:20:38 +03:00
Maksim Kita
0b59c24866 Fixed style check 2024-05-07 11:29:50 +03:00
Maksim Kita
da4f6f7b6c Added recursive CTE documentation 2024-05-07 11:29:50 +03:00
lgbo-ustc
6fa6c0261b apply 27a2b19 2024-04-28 09:27:16 +08:00
lgbo-ustc
cd9c87811f fixed bugs for all right join
add test cases

fixed typos

add document

fixed stype error and rename some variables

fixed test error

add test cases

try to recude hash join code size

debug

fixed

fixed coredump

fixed. condition result type is not bool

enable when allow_experimental_analyzer=0

fixed tests

fixed

update tests

update tests

roll backup when use the old analyzer

fixed typos

fixed

test

large obj check

test

test
2024-04-28 09:26:11 +08:00
Nikita Mikhaylov
44c05dde02
Merge pull request #62810 from ClickHouse/docs-add-final-keyword-examples
[Docs] Add examples for FINAL
2024-04-26 11:11:16 +00:00
Maksim Kita
0e28d20791 Fixed code review issues 2024-04-22 14:37:04 +03:00
Maksim Kita
0ad8c6ef78 Added docs 2024-04-22 12:12:02 +03:00
Justin de Guzman
98fef9f036
[Docs] Fix query 2024-04-19 13:36:41 -07:00
Justin de Guzman
4e38ccefdd
[Docs] Add examples for FINAL 2024-04-19 13:34:26 -07:00
Yarik Briukhovetskyi
ff5a385201
Update intersect.md 2024-04-15 11:03:15 +01:00
Josh Rodriguez
087d91d21d
Fix a typo and grammar in intersect 2024-04-13 11:02:08 -07:00
Peter
1df42bb86b
Remove original article because it's redundant 2024-03-03 22:49:11 +08:00
Robert Schulze
52afa46e23
Revert "Replace ORDER BY ALL by ORDER BY *" 2024-02-21 19:05:20 +01:00
Robert Schulze
6f6e74ad8b
Merge remote-tracking branch 'rschu1ze/master' into order-by-all-ambiguities 2024-02-19 15:19:13 +00:00
Robert Schulze
1edf3b2254
Replace ORDER BY ALL by ORDER BY * to get rid of ambiguities 2024-02-15 16:19:56 +00:00
Nikolai Fedorovskikh
a98af159b5 [Docs] fix some typos and missing commas 2024-02-13 02:10:41 +01:00
Robert Schulze
dd484fc312
Simplify what happens in SELECT all, ... [...] ORDER BY ALL
Previously setting `enable_order_by_all` distinguished for ORDER BY ALL
whether we should sort by column 'all' (if given in the SELECT clause)
or by all columns. The actual behavior was not always intuitive.

Now, we throw unconditionally an exception which also simplifies the
handling a bit. Only an edge case is affected and if users really want
to run ORDER BY ALL on a column names 'all', they can alias it.
2024-02-02 09:53:35 +00:00
robot-ch-test-poll
498894a15c
Merge pull request #58700 from ClickHouse/docs/arrayjoin-short-circuit-function-eval-no-no
Adds info about not using `arrayJoin` with `short_circuit_function_evaluation`.
2024-01-11 02:22:11 +01:00
johnnymatthews
826a39b732 Adds arrayJoin exception. Prettifies file. Fixes spelling. 2024-01-10 20:43:19 -04:00
johnnymatthews
b276694ac2 Adds ALL qualifier to JOIN. 2024-01-10 13:17:04 -04:00
Yarik Briukhovetskyi
c8f97e877f
fix typo 2024-01-09 13:31:15 +01:00
yariks5s
dc4cb2fa0e add docs 2024-01-09 11:46:54 +00:00
Alexey Milovidov
11ca0b7b44
Merge pull request #58137 from ClickHouse/thomoco-patch-4
Update from.md
2023-12-23 05:22:15 +01:00
Alexey Milovidov
bcda9b9d6f
Update from.md 2023-12-23 07:21:43 +03:00
Yarik Briukhovetskyi
483a377834
Merge pull request #57995 from yariks5s/paste_join
Implementing PASTE JOIN
2023-12-22 12:56:06 +01:00
Thom O'Connor
6e0e4d154d
Update from.md
Updated the SELECT...FROM...FINAL documentation to add better guidance to the use of FINAL, rather than saying "avoid using it"
2023-12-21 12:01:00 -07:00
Christoph Wurm
9def89d416 Fix anchors to settings.md 2023-12-20 18:26:36 +00:00
Yarik Briukhovetskyi
a58c35f2b4
fix docs 2023-12-19 21:30:35 +01:00
Yarik Briukhovetskyi
6e816d45ae
Merge branch 'master' into paste_join 2023-12-19 20:02:24 +01:00
yariks5s
4e418a89d9 fixed suggestions 2023-12-19 19:00:37 +00:00
Robert Schulze
952175ce39
Merge pull request #57875 from zhongyuankai/order_by_all
Support `ORDER BY ALL`
2023-12-19 13:38:07 +01:00
Robert Schulze
6053fa9d89
Merge remote-tracking branch 'rschu1ze/master' into docs-mv-table-engine 2023-12-19 11:52:26 +00:00