
How to Use Hibernate Batch Fetch Size to Tame N plus 1
Use Hibernate batch fetch size to turn N plus 1 queries into a few IN queries: global setting, per association annotation, trade-offs and how to verify.
Garbage collectors, heap sizing, JIT behaviour and reading a flame graph when the JVM is the suspect.

Use Hibernate batch fetch size to turn N plus 1 queries into a few IN queries: global setting, per association annotation, trade-offs and how to verify.

Size a Java thread pool with the cores times wait over compute formula, split CPU and IO pools, measure, and consider virtual threads.

Common Java benchmarking mistakes: no warmup, dead code elimination, constant folding, single runs, GC noise, wrong machine and misread averages.

Find why a Java application starts slowly: measure each phase, log class loading and bean creation, catch DNS and network stalls, then fix the biggest item.

Build a Micronaut application into a GraalVM native executable with Maven or Gradle, see what to expect and how to fix the reflection issues that remain.

Reduce Java allocation rates in hot code: measure with JFR and JMH, avoid boxing and temporary strings, reuse buffers, use primitives and know when to stop.

Build a custom Java runtime with jlink that contains only the modules your app needs, and package it into a small Docker image with a multi-stage build.

Find slow endpoints in a Java service with Micrometer timers, percentile histograms, distributed tracing and slow query logs.

Turn on parallel test execution in JUnit 5: the configuration properties, execution modes, @Isolated and resource locks, and the shared state that breaks.

Debug a Java memory leak in production: confirm the growth, capture histograms and dumps safely, read the dominator tree and fix the holder.

Speed up bulk inserts in Hibernate with sequence ids, jdbc.batch_size, ordered inserts and periodic flush and clear, then check the batches ran.

How synchronized uses monitors, what lock contention looks like in a thread dump, how to shrink critical sections and what changed for virtual threads.
We send one email when a new post is published. No spam.