pingcap / docs-cn

TiDB/TiKV/PD 中文文档
https://docs.pingcap.com/zh
Other
1.81k stars 1.21k forks source link

docs: add description about optimizer hint #15358

Open shawn0915 opened 10 months ago

shawn0915 commented 10 months ago

File: /master/optimizer-hints.md

please add these items:

INDEX_JOIN
INDEX_HASH_JOIN
INDEX_MERGE_JOIN

ref asktug topic: https://asktug.com/t/topic/1015619

Oreoxmt commented 10 months ago

@qw4990 Would you please help take a look at this issue? And please create a PR to add these hints to the optimizer hints doc if necessary.

qw4990 commented 10 months ago

@shawn0915 Thanks for your feedback, actually, INDEX_*JOIN is an alias of INL_*JOIN, and we've added description about INL_*JOIN on our document. Anyway I'll add INDEX_*JOIN to our doc as well later on.

shawn0915 commented 10 months ago

@qw4990 thank u, since I couldn't find any info about INDEX_*JOIN in this page (optimizer-hints.md), so I raise the issue here.

shawn0915 commented 10 months ago

@qw4990 大佬,顺便问下,我在代码中翻到了这段别名映射,

// TiDB hint aliases
"TIDB_HJ":   hintHashJoin,  -> HASH_JOIN
"TIDB_INLJ": hintInlJoin,   -> INL_JOIN
"TIDB_SMJ":  hintSMJoin,    -> MERGE_JOIN

但是,没找到, INDEX*JOIN is an alias of INL*JOIN 水平有限,还请指点。

qw4990 commented 10 months ago

@qw4990 大佬,顺便问下,我在代码中翻到了这段别名映射,

// TiDB hint aliases
"TIDB_HJ":   hintHashJoin,    -> HASH_JOIN
"TIDB_INLJ": hintInlJoin, -> INL_JOIN
"TIDB_SMJ":  hintSMJoin,  -> MERGE_JOIN

但是,没找到, INDEX*JOIN is an alias of INL*JOIN 水平有限,还请指点。

不好意思记错了,把 INL_JOIN 记成 INDEXJOIN 了,应该是你说的这几个别名。 我把 INDEX*JOIN 支持一下 @shawn0915