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

Feature Request: Richer SQL Hints #12304

Closed
zz-jason opened this issue Sep 23, 2019 · 2 comments
Closed

Feature Request: Richer SQL Hints #12304

zz-jason opened this issue Sep 23, 2019 · 2 comments
Assignees
Labels
epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Milestone

Comments

@zz-jason
Copy link
Member

zz-jason commented Sep 23, 2019

Feature Request

Is your feature request related to a problem? Please describe:

The supported SQL Hints are not enough to control the behavior of TiDB SQL Optimizer. We need hints to:

  • control whether to choose hash or stream aggregate operator
  • control whether to pushdown the aggregate operator to the coprocessor
  • ...

Describe the feature you'd like:

A richer sql hint set:

Hint Name Priority Status PR
HASH_AGG P1 Completed #11364
STREAM_AGG P1 Completed #11364
USE_INDEX P1 Completed #11746
IGNORE_INDEX P1 Completed #12059
AGG_TO_COP P1 Completed #12043
READ_FROM_STORAGE P1 Completed #12479
READ_FROM_REPLICA P1 Completed #11809
USE_INDEX_MERGE P1 Completed #12843
NO_INDEX_MERGE P1 Completed #11809
USE_TOJA P1 Completed #11809
MEMORY_QUOTA P1 Completed #11809
QUERY_BLOCK P1 Completed #11861
ENABLE_PLAN_CACHE P2
QUERY_TYPE P2
INL_JOIN P3 Completed #11673
BNL_JOIN P3
HASH_JOIN P3 Completed #11673
SM_JOIN P3 Completed #11673
USE_PLAN_CACHE P4

Describe alternatives you've considered:

N/A

Teachability, Documentation, Adoption, Migration Strategy:

N/A

@zz-jason zz-jason added the type/enhancement The issue or PR belongs to an enhancement. label Sep 23, 2019
@foreyes
Copy link
Contributor

foreyes commented Sep 23, 2019

Status updated.

@zz-jason zz-jason assigned eurekaka and unassigned foreyes Nov 20, 2019
@zz-jason zz-jason added the sig/planner SIG: Planner label Mar 10, 2020
@zz-jason zz-jason added this to the 4.0.0-rc milestone Mar 10, 2020
@zz-jason
Copy link
Member Author

All the P1 hints are added, I think we can close this issue. Once we need the P2 or P3 Hints, we can create a new issue to trace the progress. How do you think? @eurekaka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants