~/talk

Lazy Versus Eager Loading Strategies for JPA 2.1

Talkat JavaDay Kyiv 2015 · 2015-11-06..11-07· [databases, java]
links:none on file
slides:none on file

Shows concrete JPA 2.1 fixes and gotchas: JPQL/native value-object projections and DB aggregation beat loading full entities in a 100,000-employee benchmark (simple select is ~5x slower; join fetch faster; aggregation fastest). Demonstrates Hibernate quirks: reading a Hydra collection does one select then on commit issues an extra select plus one delete and three inserts because an unmodifiable wrapper breaks identity checks, while EclipseLink/DataNucleus do one select and OpenJPA fails. Adding one Tree to a Forest can trigger collection recreation producing 10,000+ extra inserts unless mappings and inverse-side use are changed. Recommends entity graphs and provider-specific Hibernate batch-size for large collections.

AI-written summary · about

  1. 0:00Introduction
  2. 1:39Outline
  3. 2:21Databases
  4. 3:40Hibernate
  5. 7:42ReadOnly Operations
  6. 8:25Unmodifiable Collection
  7. 9:52Lessons Learned
  8. 11:20What we learned
  9. 12:02I love JPA
  10. 12:52Typical use cases
  11. 14:34Mapping
  12. 16:57Aggregation
  13. 17:42Performance
  14. 19:11Problem
  15. 20:22Solution
  16. 23:26Logging Strategies
  17. 24:20Network Latency
  18. 25:02Lazy Loading Strategy
  19. 26:04Large Objects
  20. 26:55Database
  21. 33:56Set semantics
  22. 35:41Inverse relationships
  23. 37:41Eclipselink
  24. 38:02JPA Provider
  25. 38:49Dynamic Execution Path
  26. 39:30Entity Graph
  27. 39:50Annotations
  28. 41:28Advantages
  29. 42:31Silver Bullet
  30. 42:55Use Cases
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.