Fastest MS SQL Inserts — Part 5: Hibernate Tuning
In Part 1 we watched Spring Data's saveAll() take 7x longer than batched persist() because every entity triggers a SELECT before its INSERT. In Part 2 we …

In Part 1 we watched Spring Data's saveAll() take 7x longer than batched persist() because every entity triggers a SELECT before its INSERT. In Part 2 we …
Your Car class has twelve methods now. Washing, waxing, polishing, billing — everything that ever needed the car's fields got bolted onto it. Nobody remembers …
" ".isEmpty() returns false, but " ".isBlank() returns true — whitespace counts as blank, not empty.
1" ".isEmpty(); // false — length is 1
2" ".isBlank(); // true — whitespace only (Java 11+)
3"abc".isBlank(); // false
I caught myself writing s.trim().isEmpty() again today. String.isBlank() exists since Java 11 and covers exactly this case — plus it is Unicode-aware, so " \u00A0 ".isBlank() also works where trim() misses non-breaking spaces.
In previous discussions, we established that bulk insert and multi-value batched inserts represent the fastest methods for inserting data into an MS SQL Server …
In a previous post, we concluded that the Bulk API insert is the fastest way to insert data into an MS SQL Server database if the batch size is reasonably …
New Java, SQL Server & testing posts — straight to your inbox.
Introduction In the previous post Fastest way to insert the data in MS SQL - Part 1 Hibernate Batching we compared the performance of Hibernate inserts with …