High-Performance Java Persistence Newsletter, Issue 55
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 that marks the 10-year anniversary of this blog. For over a decade, I managed to publish over 560 articles, answer thousands of StackOverflow questions, and create several OSS projects as well.
Looking back, I can only think of this quote from Bill Gates:
Most people overestimate what they can do in one year and underestimate what they can do in ten years.
A very good article I’ve read since the last newsletter edition was this one about database migrations.
Therefore, I decided to add another tool that helps you track where a given SQL query originated in your application stack. For more details about this topic, check out this article.
If you are using PostgreSQL, then you should definitely check this article about the internals of row-level locks.
Blaze Persistence is a great addition to JPA and Hibernate. Not only does it provide a better Criteria API and Keyset Pagination, but you can use it to fetch multiple entity collections at once using the MULTISET operator.
Here are the best tweets I posted since the last newsletter:
Software development is the only industry where a person can become a senior before turning 30 years old.— Vlad Mihalcea (@vlad_mihalcea) September 2, 2023
Protip: If you want to become a better software developer, you should study the source code of the frameworks you are using.— Vlad Mihalcea (@vlad_mihalcea) September 19, 2023
Not only do you get a better understanding of how they work, but you're going to learn how various design patterns are applied in practice.
Pro tip: If you are setting a PostgreSQL or MySQL, don't use the default database settings because those are meant for personal computers or notebooks.— Vlad Mihalcea (@vlad_mihalcea) September 8, 2023
One example is the Buffer Pool size:
✅ For MySQL, increase the innodb_buffer_pool_size
✅ For PostgreSQL, increase…
Code comments in practice pic.twitter.com/iT0K0wtppA— Vlad Mihalcea (@vlad_mihalcea) October 1, 2023
PostgreSQL 16 was released, and it provides many improvements, like query parallelization, the
pg_stat_io performance monitoring tool, as well as VACUUM and replication improvements.
The Hibernate ORM project has released two versions, 6.3.1 and 6.2.9, that you may be interested in investigating.
Get in touch with my latest articles!
The following StackOverflow answers have been trending since the last newsletter episode:
- How to get rid of N+1 with JPA Criteria API in Hibernate
- Multiple Hibernate sequence generators for one entity with PostgreSQL
- Write Skew anomaly in Oracle and PostgreSQL does not rollback transaction
- What is the use of Hibernate batch processing
- Can I use an entity’s identifier in
hashCodewith fallback to instance equality?