A conference talk covering common JPA and Hibernate performance pitfalls in Java Spring Boot applications. Key topics include: connection pool management (why pooling is ~4000x faster than direct connections), the dangers of Spring's open-session-in-view being enabled by default, how auto-commit settings affect when Hibernate acquires connections, eager vs lazy loading (many-to-one defaults to eager, causing N+1 queries), Hibernate's first-level cache (persistent context), join fetch to solve N+1 problems, and using DTO projections (JPQL constructor expressions or interface-based) instead of entity-to-DTO mapping for read-only queries. Practical demos with unit tests and IntelliJ's persistent context visualizer illustrate each issue and fix.

44m watch time

Sort: