Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: insert 语句中rewrite && commit优化问题

[TiDB Usage Environment] Production Environment
[TiDB Version] 4.0
[Encountered Issue: Problem Phenomenon and Impact]
The INSERT statement takes a long time during the prewrite and commit phases. How can this be optimized? The average prewrite time is 99% 30 milliseconds. Disk latency is not high. After checking the async process, most of the time is consumed in the raft phase (log commit phase takes about half, around 15 milliseconds). The apply phase consumes very little time. In TiDB 4.0, is it possible to increase the store-pool-size to enhance production?
SQL:
INSERT INTO
nova_transaction_order_record (
id,
customer_id,
account_id,
symbol,
side,
TYPE,
STATUS,
price,
average_price,
amount,
filled_fee,
fee_rule,
fee_mark,
spend_currency,
spend_account_id,
spend_amount,
deal_spend_amount,
get_currency,
get_account_id,
get_amount,
deal_get_amount,
source,
channel,
canceled_at,
finished_at
)
VALUES
(..., NULL,..., NULL, NULL)
[Attachments: Screenshots/Logs/Monitoring]