macrozheng
Nov 23, 2023 · Backend Development
Why MyBatis‑Plus saveBatch Is Slow and How to Fix It with JDBC rewriteBatchedStatements
This article explains why using MyBatis‑Plus saveBatch for bulk inserts can cause 5‑6 second delays, analyzes the underlying per‑row INSERT behavior, and shows how adding rewriteBatchedStatements=true to the JDBC URL dramatically reduces execution time to a few hundred milliseconds.
JDBCMyBatis-Plusbatch insert
0 likes · 7 min read