High-Performance Java Persistence Newsletter, Issue 30
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. Wouldn’t that be just awesome?
Well, Hypersistence Optimizer is that tool! And it works with Spring Boot, Spring Framework, Jakarta EE, Java EE, Quarkus, or Play Framework.
So, enjoy spending your time on the things you love rather than fixing performance issues in your production system on a Saturday night!
Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system using Java.
The pick of this edition is this article written by Franck Pachot about PostgreSQL statement caching and how generic plans are generated.
When using PostgreSQL, then you should definitely read this article which explains how to get an
Index Only Scan instead of an
Index Scan when executing a query that contains a function expression.
Keyset pagination is a very efficient pagination mechanism, especially when navigating large result sets. Even if JPA and Hibernate don’t offer built-in support for Keyset pagination, Blaze Persistence allows you to build Keyset pagination queries dynamically. For more details about this feature, check out this article.
If you are using MySQL, this article shows you how to store and query JSON objects.
SQL provides a wide range of features that are very often overlooked. For instance, if you want to override the default SQL operation order, you can use derived tables or CTE. And if you want to learn more about these very useful SQL features, you can read the following two articles:
A very important thing I’ve learned from this article is that MySQL stores in memory the row modification counter that triggers the index statistics update. For this reason, a server restart might delay the index statistics updates, therefore influencing the effectiveness of SQL query execution plans. If you’re interested in this topic, Jesper Wisborg Krogh explains it in great detail in this article.
Here are the best tweets I posted since the last newsletter:
Software developer choosing a good name for a new method or variable. pic.twitter.com/Rg8EZPsbG6— Vlad Mihalcea (@vlad_mihalcea) August 26, 2021
Software developers never stop learning— Vlad Mihalcea (@vlad_mihalcea) August 29, 2021
You don't need 10x developers to build a great team.— Vlad Mihalcea (@vlad_mihalcea) August 17, 2021
You need professionals who are kind and help each other. That's how you build a great team.
Software developer fixing a YAML file pic.twitter.com/bxGMLqAyeU— Vlad Mihalcea (@vlad_mihalcea) August 27, 2021
The maximum number of nested for loops is 18 because that's the number of letters between i and z.— Vlad Mihalcea (@vlad_mihalcea) August 28, 2021
The 2.4.2 version of the amazing Hypersistence Optimizer has been released. If you are using JPA and Hibernate, this tool will help you speed up your data access layer so that you can focus on providing business value rather than solving complex performance issues.
PostgreSQL 13.2 has been released and provides many new features and bug fixes as well.
Get in touch with my latest articles!
The following StackOverflow answers have been trending over the past two weeks:
- What’s the goal of the JPA Entity Graph?
- How to fix the Hibernate
org.hibernate.MappingException– No Dialect mapping for JDBC type: 2003
- How to filter a PostgreSQL array column with the JPA Criteria API?
- How to call a stored procedure with two parameters using Spring and Hibernate
- How does Hibernate detect the dirty state of an entity object?
- How to combine DISTINCT and ORDER BY for @ManyToOne associations in JPA Criteria API?