High-performance - Java Persistence.pdf
Here's a summary of the paper:
: Locks the database rows directly ( SELECT ... FOR UPDATE ). Use this only when data collisions are frequent and financial or transactional accuracy is critical. Database Indexing
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later. High-performance Java Persistence.pdf
What's been your biggest challenge with Java persistence performance? I’d love to hear your thoughts.
Always default to FetchType.LAZY for all associations ( @OneToMany , @ManyToMany , @ManyToOne , @OneToOne ). Dynamic Fetching with Join Fetching Here's a summary of the paper: : Locks
"High-Performance Java Persistence" by Vlad Mihalcea offers a comprehensive guide to optimizing data access layers, bridging database administration with Hibernate and JPA application development. The text covers foundational JDBC mechanisms, advanced Hibernate mapping, caching strategies, and concurrency control to enhance application performance. Detailed chapters, sample code, and additional tips are available on vladmihalcea.com . High-Performance Java Persistence - Amazon.com
Incorrect entity mappings are a primary source of architectural performance issues. The Danger of Eager Fetching Database Indexing This public link is valid for
When you need window functions, CTEs (Common Table Expressions), or complex aggregations, drop JPA and use: Via entityManager.createNativeQuery() .
To enable batching in Hibernate, configure the following properties: properties
hibernate.order_inserts / hibernate.order_updates : Tells Hibernate to sort statements by entity type before batching. Without ordering, a sequence of alternating inserts (e.g., Post, Comment, Post, Comment) breaks the JDBC batch execution. The Problem with Identity Generation
