Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 执行这样的语句UPDATE vote_table SET votes=votes+1 where name = ? tikv是不是要先把name对应的vote GET下来再PUT回去?有更好的做法吗

SQL execution
Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 执行这样的语句UPDATE vote_table SET votes=votes+1 where name = ? tikv是不是要先把name对应的vote GET下来再PUT回去?有更好的做法吗
SQL execution
There’s no good solution; transactions exist in TiDB’s memory and are written to TiKV upon submission.
It is better to use primary key conditions when updating, as it will be more efficient.