Execution Plan of TiDB

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB的执行计划

| username: Aaronz

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 5.3, 7.5
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
The execution plans of TiDB versions 5.3 and 7.5 are significantly different. Have you considered a more intuitive way to introduce the improvements? Otherwise, finding them from the update records is still not intuitive enough.

| username: WalterWj | Original post link

The official website has an interpretation of the execution plan :thinking:.

| username: forever | Original post link

This is an execution plan interpretation. I see that you want an introduction to the differences in execution plans after the version upgrade.

| username: WalterWj | Original post link

There should be no specific comparison, but you can directly interpret and learn the execution plan of the new version.

| username: Aaronz | Original post link

Yes, yes, yes. After the version changes, the execution plans of some statements have changed, and the execution efficiency is different. At this time, you can change the writing method. It would be better if the prompts could be more explicit. Having examples would be perfect.

| username: Soysauce520 | Original post link

Generally, the efficiency is improved by various operators and logical optimizations, unless you encounter a specific bug, which is very unlikely. Changing the writing style is too vague; SQL comes in many forms. You might as well provide specific examples of the issues you are facing, and perhaps you can get answers in the community.

| username: buddyyuan | Original post link

You can research this tool

PCC pingcap A tool used to capture plan changes among different versions of TiDB

| username: zhanggame1 | Original post link

The execution plan is the core part of any database, and it’s not easy to explain clearly.

| username: TiDBer_ok0VXN1s | Original post link

Forget about 5.3. Refer to the new one.