-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a system variable to control whether to inline CTE or not #36514
Labels
type/enhancement
The issue or PR belongs to an enhancement.
Comments
/assign @dayicklp |
12 tasks
12 tasks
please assign to me ~ |
Merged
13 tasks
elsa0520
added a commit
to elsa0520/tidb
that referenced
this issue
Sep 7, 2022
This pr adds a new session variable, which is mainly used to control whether all CTEs in the entire session are inlined or not. The default value is false, which means that inline cte is not enabled by default. (But if the user directly specifies the merge hint, it can still be turned on) If the variable is set to true, it means that all CTEs for this session try to enable inlining. Fixed pingcap#36514
ti-chi-bot
pushed a commit
that referenced
this issue
Sep 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enhancement
Currently, CTE can only be inlined through
MERGE()
hint. But for those queries that have many CTEs, and queries that are generated by BI, it is better to have a system variable to control whether to inline CTE or not.Suggested var name:
tidb_opt_inline_cte
NB.
MERGE()
hint can override thetidb_opt_inline_cte
variable.The text was updated successfully, but these errors were encountered: