Performance oriented Spring Data JPA & Hibernate
summary
Covers concrete fixes: measure connection lease times with FlexiPool, spot N+1 with IDE tracing or Digma, and QuickPerf catches unexpected extra deletes in tests. Recommends disabling spring.jpa.open-in-view, setting autocommit=false to delay connections, and using transaction template to keep connections short. Shows surprising defaults (Tomcat 200 threads vs HikariCP default 10 connections; a trivial call leasing a connection for ~210ms) and practical JPA fixes: use getReference byId, entity graphs or projections for reads, and @DynamicUpdate for smaller updates.
AI-written summary · about
chapters (10)
- 0:00Performance issues overview
- 2:41Identifying performance bottlenecks
- 6:21Database connection management
- 12:17Tooling for analysis and debugging
- 14:02Fixing common connection issues
- 23:20Optimizing entity persistence
- 28:36Managing entity relationships
- 33:50Automated performance testing
- 37:06Using projections for efficiency
- 42:13Key takeaways and conclusions
related talks
49mPerformance oriented Spring Data JPA & Hibernate
51mWhen ORM Becomes OMG: Performance Pitfalls in JPA and Friends
52mJava Persistence and Hibernate Tips that can boost up your application performance
45mWhen ORM Becomes OMG: Performance Pitfalls in JPA and Friends
47mWhen ORM Becomes OMG: Performance Pitfalls in JPA and Friends
46mMastering JPA Performance
01h 05mJPA Puzzlers (+Hibernate and Spring)
44mORM Insights - How not to hurt yourself?
