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

Improve the Accuracy and Robustness of Index Selection #18065

Open
zz-jason opened this issue Jun 17, 2020 · 0 comments
Open

Improve the Accuracy and Robustness of Index Selection #18065

zz-jason opened this issue Jun 17, 2020 · 0 comments
Assignees
Labels
epic/access-path feature/accepted This feature request is accepted by product managers priority/P0 The issue has P0 priority. sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.
Milestone

Comments

@zz-jason
Copy link
Member

zz-jason commented Jun 17, 2020

Description

Improve the optimizer accuracy: don't select a wrong index on up-to-date statistics. Query optimizer usually adopts assumptions that usually not hold in the real-world dataset. For example, independent assumption between attributes of a relation, uniformly distribution inside a histogram bucket. These assumptions usually lead to bad estimation accuracy, which further causes a sub-optimal execution plan. In this issue, let's focussed on the wrong index selection issue.

Improve robustness: prevent plan regression when the underlying data is changed.

Category

Stability, Performance

Value

  • Value Score: 5

Usually, there are many applications running on a TiDB cluster. If one of the applications runs a SQL whose index selection is incorrect, for example, a full-range table scan is chosen instead of an index range scan. The whole cluster can be influenced, all the applications run on the same cluster can be slowed down. Which causes a bad production incident.

It's hard to totally prevent incorrect index selection, but we need to try our best to fix all the existing known issues and increase the robustness of the index selection.

Progress Tracking

Time

GanttStart: 2020-07-01
GanttDue: 2020-11-28
GanttProgress: 30%

@zz-jason zz-jason added sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature. epic/access-path labels Jun 17, 2020
@zz-jason zz-jason added this to the v5.0-alpha milestone Jun 17, 2020
@scsldb scsldb added the priority/P0 The issue has P0 priority. label Jun 18, 2020
@SunRunAway SunRunAway added priority/P0 The issue has P0 priority. and removed priority/P0 The issue has P0 priority. labels Jun 29, 2020
@zz-jason zz-jason changed the title improve the accuracy and robustness of index selection Improve the Accuracy and Robustness of Index Selection Jul 13, 2020
@scsldb scsldb modified the milestones: v5.0.0-alpha, v5.0.0-beta.1 Jul 15, 2020
@scsldb scsldb added the feature/accepted This feature request is accepted by product managers label Jul 16, 2020
@scsldb scsldb modified the milestones: v5.0.0-beta.1, v5.0.0-rc Dec 14, 2020
@jebter jebter modified the milestones: v5.0.0-rc, v5.0.0 Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/access-path feature/accepted This feature request is accepted by product managers priority/P0 The issue has P0 priority. sig/planner SIG: Planner type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants