Tagged articles
6 articles
Page 1 of 1
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 InsertJavaMybatis-Plus
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