Tagged articles
6 articles
Page 1 of 1
Su San Talks Tech
Su San Talks Tech
Jun 25, 2025 · Databases

Why MyBatis‑Plus saveBatch Is Slow and How to Speed It Up 30×

This article analyzes the poor performance of MyBatis‑Plus saveBatch, compares it with single inserts, manual SQL batching, and JDBC executeBatch, and shows how enabling the rewriteBatchedStatements flag can dramatically improve batch insert speed.

Batch InsertJDBCmybatis-plus
0 likes · 10 min read
Why MyBatis‑Plus saveBatch Is Slow and How to Speed It Up 30×
Architect
Architect
Dec 20, 2024 · Backend Development

Boost MyBatis-Plus Batch Inserts by 2000% with rewriteBatchedStatements and ID Pre‑Generation

By configuring MySQL’s rewriteBatchedStatements=true, pre‑generating primary keys, adjusting MyBatis executor settings, and employing asynchronous multithreaded batch inserts, this guide demonstrates how to accelerate MyBatis‑Plus saveBatch operations from seconds to milliseconds, achieving up to a 2000% performance gain in large‑scale data scenarios.

Batch Insertjavamultithreading
0 likes · 20 min read
Boost MyBatis-Plus Batch Inserts by 2000% with rewriteBatchedStatements and ID Pre‑Generation
Zhuanzhuan Tech
Zhuanzhuan Tech
Nov 28, 2024 · Backend Development

Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs

This article explains how to dramatically improve MyBatis-Plus batch insertion speed—up to 2000%—by enabling rewriteBatchedStatements, pre‑generating primary keys to handle foreign‑key relationships, applying proper JDBC batch settings, and using asynchronous multithreaded insertion with optimized connection‑pool and executor configurations.

Batch InsertID generationJDBC
0 likes · 21 min read
Boosting MyBatis-Plus Batch Insert Performance by 2000% with rewriteBatchedStatements and Pre‑Generated IDs
Su San Talks Tech
Su San Talks Tech
May 15, 2023 · Databases

Why MyBatis‑Plus Batch Inserts Are Slow and How to Speed Them Up

This article investigates the poor performance of MyBatis‑Plus batch inserts, compares several insertion strategies—including single inserts, saveBatch, manual SQL concatenation, and JDBC executeBatch—measures their execution times, and shows how enabling the rewriteBatchedStatements driver option dramatically improves throughput.

JDBCbatch-insertperformance
0 likes · 10 min read
Why MyBatis‑Plus Batch Inserts Are Slow and How to Speed Them Up
dbaplus Community
dbaplus Community
Apr 11, 2022 · Databases

Why JDBC executeBatch Sends Single Queries and How to Enable True Batch Execution in MySQL

This article explains why MySQL 8.0’s JDBC driver processes executeBatch() calls as separate statements, demonstrates the root cause in the driver’s rewriteBatchedStatements logic, and shows how configuring rewriteBatchedStatements=true (and optionally allowMultiQueries=true) enables genuine batch execution.

Batch ProcessingJDBCallowMultiQueries
0 likes · 6 min read
Why JDBC executeBatch Sends Single Queries and How to Enable True Batch Execution in MySQL