Replies: 1 comment 2 replies
-
It looks like I need something like https://sqlite.org/lang_with.html#mathint Which had some discussion here #23539 (comment) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the following query,
expensive_query
is ran twice because clickhouse plans the left and right side of thejoin
separately.In this trace, the two yellow lines that are both 1.82s are the duplicate invocations of the expensive query. (sidenote: I found it curious that the two queries ran serially- would we expect them to be parallel?)
I can mitigate this behavior by putting the expensive query in a temporary table rather than an alias
but doing so turns my query into a 2 statement query rather than a one statement query, which causes some headache.
Are there any other tricks to prevent clickhouse from doing the extra work?
Beta Was this translation helpful? Give feedback.
All reactions