Summary

Performance-tuning the persistent layer means starting at the bottom with a good database design with correct indexes, well tuned queries, and a thought-through choice of isolation level. If JDBC is used directly, make sure that connection pooling is used, and investigate what the application may gain by using fetch size, batch updates, and prepared statements.

With Hibernate and the JPA specifications, the gap between the relational database layer and the Java objects is bridged. In the Java layer, tuning can be performed using the following techniques and strategies:

  • Retrieving data with Hibernate and JPA requires applying the correct fetch strategy. Lazily loaded data avoids the cost of early loading relationships. This, however, carries ...

Get WildFly Performance Tuning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.