For performance tuning,
you should check the
High-Performance Java Persistence book.
This book has three parts:
- the first one is focused on
JDBC basics (connection management, batch updates, fetch sizes and concurrency control mechanisms).
- the second part is focused on JPA and Hibernate (associations, inheritance, batch updates, fetching strategies, caching)
- the third part is dedicated to jOOQ and its powerful type-safe querying capabilities, like window functions or common table expressions.
Overall, the book will make you understand everything you need to know about how a data access layer works in general and with the most common Java frameworks, in particular.