Execution Plan Shows TableDual_10

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

Original topic: 执行计划显示TableDual_10

| username: 胡杨树旁

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Problem Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]
The execution plan shows TableDual_10. I don’t quite understand what it means?
SQL: explain analyze select * FROM
PLC_MAIN plcmaineo0_
WHERE
(
plcmaineo0_.policyNo = ‘6605212022652828000139’ AND plcmaineo0_.businessType = ‘66’
and (plcmaineo0_.endorseNo = ‘6605212022652828000139’ OR plcmaineo0_.policyNo = ‘6605212022652828000139’)
AND plcmaineo0_.businessType = ‘68’
AND plcmaineo0_.endorseTime <= ‘2023-01-13 13:34:40.673’
)
AND plcmaineo0_.lstEffVerFlag = ‘1’
ORDER BY
plcmaineo0_.version DESC;

| username: 胡杨树旁 | Original post link

Execution Plan:

| username: tidb菜鸟一只 | Original post link

Please share the table structure for review.

| username: xingzhenxiang | Original post link

Optimize LIMIT 0 to TableDual to avoid constructing useless execution plans.

| username: 我是咖啡哥 | Original post link

Where is limit 0?

| username: 胡杨树旁 | Original post link

TableDual — What does it mean? I couldn’t find any relevant explanation on the official website.