Skip to content
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

UCP: support hint 'USE_CASCADES(ON|OFF)' to use/disuse cascades planner in a single query #15215

Closed
francis0407 opened this issue Mar 9, 2020 · 9 comments · Fixed by #15352
Closed
Assignees

Comments

@francis0407
Copy link
Member

Description

Cascades planner is a new optimizer in TiDB. Currently, we uses a session variable tidb_enable_cascades_planner to determine whether uses the cascades planner or not. But sometimes, we only want to use cascades planner for a single query, without affecting other queris in the same session.
For example:

# This query should be forced to use cascades planner.
select /*+ USE_CASCADES(ON) */ * from t;
# This query should be forced to use core planner(the old one).
select /*+ USE_CASCADES(OFF) */ * from t;

Score

  • 300

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Golang
  • SQL

Learning Materials

@gauss1314
Copy link
Contributor

/pick-up-challenge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 11, 2020

"easy" issue is not available since you have got 200 score in this repo. Please pickup "medium" or "hard" directly. Or you can pick up "easy" Issue in other repos. Thank you.

@gauss1314
Copy link
Contributor

gauss1314 commented Mar 12, 2020

Hi @francis0407 , there are other hints like USE_TOJA(true), ENABLE_PLAN_CACHE(false),
so for consistency, how about just change ON|OFF to true|false?

# This query should be forced to use cascades planner.
select /*+ USE_CASCADES(true) */ * from t;
# This query should be forced to use core planner(the old one).
select /*+ USE_CASCADES(false) */ * from t;

@francis0407
Copy link
Member Author

@gauss1314 good catch! Use true|false then.

@gauss1314
Copy link
Contributor

/pick-up-challenge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 12, 2020

"easy" issue is not available since you have got 200 score in this repo. Please pickup "medium" or "hard" directly. Or you can pick up "easy" Issue in other repos. Thank you.

@you06
Copy link
Contributor

you06 commented Mar 13, 2020

@gauss1314 the pick problem is fixed and this task is in review stage now, you can pick up new issues.

@gauss1314
Copy link
Contributor

/pick-up-challenge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 13, 2020

@gauss1314 pick up issue success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants