What is the implementation principle of the DistSQL module? Does it only handle complex queries?

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

Original topic: DistSQL模块的实现原理是什么?只处理复杂查询吗?

| username: alfred

【TiDB Usage Environment】Production, Testing, Research
【TiDB Version】
【Encountered Problem】
【Reproduction Path】What operations were performed that led to the problem
【Problem Phenomenon and Impact】

【Attachments】

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: xfworld | Original post link

The principle is to parse the SQL, then choose the appropriate distributed operator for computation based on logical and physical optimization. When there are scenarios where the operator pushdown is not suitable, a degraded scan will be performed… For more details, you can refer to the relevant chapters on analyzing SQL.

Reference documents: