Review of High-Performance Java Persistence by Vlad Mihalcea
SummaryA structured and clear read into Hibernate, JDBC and JOOQ. Plenty of useful tips and common pitfalls that will help you improve the performance of your data access. Heavily focused on relational models, so don't expect much on other types of data stores. Lots of examples to clarify points of discussion.
Why should you read itIf you are a java developer and have to deal with persistence, you probably have come across Hibernate and JPA. Unfortunately, writing a highly performant data access layer is difficult to get right. Similarly, bad data access patterns are difficult to tease out from an application once they have been implemented. This book describes some intricate details of JDBC, Hibernate and lightly covers JOOQ with the aim of high performance.
- What actually gets executed when you use @OneToMany, @OneToOne, @ManyToOne, @ManyToMany
- Which Identifier strategy should you use for your primary keys
- How you should fetch entities from the Database and when
- Statement batching and reordering
- The various caches available, how they work and their problems
- Consistency vs Performance with locking
I would highly recommend this book, whether you are new to the topic or have a fair understanding of Hibernate. I plan on using this as a desk reference for any future project.
Get it here, https://vladmihalcea.com/books/high-performance-java-persistence/