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

perf-tuning: update anchors in wrong-index-solution #3934

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
perf-tuning: update anchors in wrong-index-solution
  • Loading branch information
ran-huang committed Jul 9, 2020
commit 2ceb8884a316750252b242198d22e72b8c50ef5f
4 changes: 2 additions & 2 deletions wrong-index-solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ category: performance

这时意味着刚刚结束 `ANALYZE` 命令或者结束后不久。这时可能和 TiDB 对行数的估算逻辑有关。

对于等值查询,在[统计信息简介](/statistics.md)中提到了一种可能的情况。这时可以先检查是不是这种特殊情况,然后进行对应的处理。
对于等值查询,错误索引可能是由 [Count-Min Sketch](/statistics.md#count-min-sketch) 引起的。这时可以先检查是不是这种特殊情况,然后进行对应的处理。

如果经过检查发现不是上面的可能情况,可以使用 [Optimizer Hints](/optimizer-hints.md) 中提到的 `USE_INDEX` 或者 `use index` 来强制选择索引。同时也可以使用[执行计划管理](/sql-plan-management.md)中提到的方式来非侵入地更改查询的行为。
如果经过检查发现不是上面的可能情况,可以使用 [Optimizer Hints](/optimizer-hints.md##use_indext1_name-idx1_name--idx2_name-) 中提到的 `USE_INDEX` 或者 `use index` 来强制选择索引。同时也可以使用[执行计划管理](/sql-plan-management.md)中提到的方式来非侵入地更改查询的行为。

## 其他情况

Expand Down