pingcap / pingcap/tidb

`tidb_opt_ordering_index_selectivity_threshold` should also be valid for clustered index

Open
#52,036 2 comments 0 reactions 1 assignee Claimed by @time-and-fate View on GitHub
affects-7.1 affects-7.5 affects-8.1 report/customer sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

If a table has a clustered index as an option of order index, the choice between the clustered index and another index using selection condition is not controlled by the variable `tidb_opt_ordering_index_selectivity_threshold`. It'd be better to support this case, to avoid choosing bad plan for the same case (but for clustered index) as described in https://github.com/pingcap/tidb/issues/42060.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.