The SQL execution time of the TiDB database is much greater than the individual execution times

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

Original topic: tidb数据库 SQL 执行时间远大于各项执行时间

| username: lemonade010

Why is the SQL execution time much greater than the execution time of each item? Shouldn’t it be less than or equal to it?

| username: DBAER | Original post link

Use trace to check which specific SQL statement it is.

| username: wangkk2024 | Original post link

Equivalent to dbtime

| username: zhanggame1 | Original post link

Is this a query or a DML statement?

| username: zhaokede | Original post link

What does the specific SQL look like?

| username: TIDB-Learner | Original post link

Check out this document: 最佳实践:TiDB 业务读变慢分析处理 | PingCAP

| username: shigp_TIDBER | Original post link

Is it DDL or DML, and does it have TiFlash?

| username: lemonade010 | Original post link

Full table scan

| username: lemonade010 | Original post link

DML, without TiFlash

| username: dba远航 | Original post link

As mentioned above, it’s parallel. Parallel means that multiple nodes are using the sum of the above time simultaneously.

| username: lemonade010 | Original post link

Due to parallel execution, the SQL execution time may be much shorter than the aforementioned times. I don’t quite understand this sentence. I can understand parallelism, but this explanation says that the SQL execution time is much shorter than the aforementioned times.

| username: 小龙虾爱大龙虾 | Original post link

Is there anything special about the SQL? Please send the text and execution plan.

| username: zhang_2023 | Original post link

Post the execution plan.