Tagged articles
3 articles
Page 1 of 1
Top Architect
Top Architect
Aug 29, 2023 · Databases

Efficient Insertion of 300,000 Records Using MyBatis and JDBC

This article explains how to insert 300,000 rows into a MySQL table efficiently by defining a User entity, configuring MyBatis mappers, and comparing three approaches—direct bulk insert, per‑row loop insert, and batch insert with configurable batch sizes—while also providing JDBC equivalents and performance tips.

JDBCJavaMyBatis
0 likes · 15 min read
Efficient Insertion of 300,000 Records Using MyBatis and JDBC
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