JPA works well until the system grows enough for hidden costs to matter. At scale, lazy loading, flush behavior, transaction boundaries, object mapping, batch writes, and query shape become production concerns.
This hub is intentionally smaller than the Spring Boot and PostgreSQL hubs because the current article base has fewer dedicated JPA pieces. Use it as the starting page for persistence performance, then expand it with deeper Hibernate and query investigations.
Current JPA and persistence articles
- JPA vs JDBC Performance ? 10M Rows (PostgreSQL) – the core scale comparison for ORM vs lower-level access.
- Spring Boot CRUD Operations Guide with PostgreSQL – the baseline persistence path before scale problems appear.
- Call Stored Procedures in PostgreSQL with Spring Boot 3 – when application code needs database-side execution.
Related production context
- API Slow? Database Fine ? Real Performance Case Study – useful when ORM is suspected but not yet proven guilty.
- Kafka Lag vs PostgreSQL Writes: What Slowed the Consumer Down – relevant when JPA writes sit behind Kafka consumers.
- JobRunr with Spring Boot: In-Memory Jobs vs Database Persistence – background persistence trade-offs.
JPA scale problems to watch
- N+1 queries that stay invisible in small datasets.
- Transactions that hold database resources longer than expected.
- Large persistence contexts increasing memory pressure.
- Batch writes that are configured but not actually batched.
- DTO projections avoided until response time is already damaged.
Suggested next articles
- JPA Worked Fine Until 10 Million Rows
- Hibernate N+1 Queries: The Production Signal We Missed
- Why JPA Batch Inserts Were Still Slow in Spring Boot
- DTO Projections vs Entities for Read-Heavy APIs