Tag

List Partition

0 views collected around this technical thread.

macrozheng
macrozheng
Apr 17, 2023 · Fundamentals

How to Efficiently Split Large Java Lists into Smaller Chunks

This article explains why MySQL’s SQL length limit can cause batch‑insert failures and demonstrates five practical ways to partition a large Java List—using Guava, Apache Commons, Hutool, JDK Stream, and custom subList—complete with code examples and execution results.

Apache CommonsGuavaHutool
0 likes · 9 min read
How to Efficiently Split Large Java Lists into Smaller Chunks
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 26, 2021 · Backend Development

Solving MyBatis Native Batch Insert Issues with Guava List Partitioning

This article explains how MyBatis native batch inserts can exceed MySQL's maximum SQL size, causing errors, and demonstrates a solution using Guava's Lists.partition to split the data into smaller chunks, improving performance and avoiding execution failures.

GuavaJavaList Partition
0 likes · 8 min read
Solving MyBatis Native Batch Insert Issues with Guava List Partitioning