Orm Fetch And Batching Performance

Making JPA and Hibernate stop issuing the statements you did not ask for, and making the ones they do issue cheap: statement count as the primary number, N+1 from an association and from a collection, join fetch versus entity graph versus batch fetching, the cartesian product two join-fetched collections produce, DTO projections instead of entity graphs, and why write batching silently does nothing under identity id generation. Use when the query count scales with rows rendered, when a page issues hundreds of selects, when LAZY was changed to EAGER to make an exception go away, when open-session-in-view is switched on, when a bulk write is one INSERT per row, when a flush is slow, or when pagination over a join fetch warns about in-memory paging. Not the plan for one statement (sql-query-performance), pool sizing (connection-pool-sizing), the runtime patterns themselves (orm-behavioral-patterns), where the mapping lives (metadata-mapping), or the second-level cache decision (caching-strategies).

robsonkades 648f5b6 4 files · 26.2 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/orm-fetch-and-batching-performance commit 648f5b6c51

Frequently asked questions

npx skillmds@latest add robsonkades/orm-fetch-and-batching-performance