Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: insert语句慢
[TiDB Usage Environment] Production Environment, Testing
[TiDB Version] v5.1.0
[Encountered Problem: Problem Phenomenon and Impact]
Found slow SQL queries where some databases take over ten seconds to execute insert statements, resulting in very low consumption capacity for the entire database. Other larger queries (with more field values) are actually faster.
Figure 1: Time-consuming insert statement
Figure 2: Execution time of the time-consuming insert statement
Figure 3: Manual execution time is very fast
Figure 4: Heatmap