OpenTenBase / OpenTenBase/TXSQL
扩展hint配置index dive
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 337
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
扩展hint配置index dive
对索引列进行范围查询、且谓词等值条件数量小于eq_range_index_dive_limit时,优化器会使用索引下探(index dive)估计索引列上符合谓词条件的记录数。但是eq_range_index_dive_limit不能按SQL灵活配置。因此通过hint扩展。
示例:# 对 t1 的索引下探页面数量设置为 10, t2 的索引下探页面数量设置为 100.
select /+index_dive_pages(t1 10) index_dive_pages(t2 100)/ * from t1, t2 where t1.a = t2.a and t2.b > 20 and t1.b > 100;
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing eq_range_index_dive_limit setting and the optimizer's index-dive path, then inspect how optimizer hints are parsed and applied. The issue names no files or tests; done should include an index_dive_pages hint that accepts the shown per-table values and affects index-dive estimation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100