High-Performance Java Persistence Newsletter, Issue 8
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 Jaana Dogan. The article explains multiple hard-to-grasp topics in a very clear and concise manner, which is very easy to follow, no matter how much experience you have on this topic. Therefore, I strongly recommend you read Jaana’s article.
Another very interesting discussion is this Quora answer, which explains how Quora managed to implement Sharding for its MySQL databases.
Java 14 introduced support for Records, which are a special type of Java class that is suitable for encapsulating data. If you want to understand what Java Records are and how they differ from POJOs or Java Beans, then you should start with this article.
While Java Records are not suitable for defining JPA entities, they are a very good choice for DTO projections. This article explains why Java Records are very suitable for wrapping query projections and shows you how you can nest multiple Java Records using the Hibernate
The default configuration values offered my many relational database systems are suitable for desktops or notebooks. If you want to install PostgreSQL or MySQL for a production system, you have to adjust various database settings to take advantage of the underlying server capabilities. For instance, when using PostgreSQL, you might want to adjust the
maintenance_work_mem configuration properties. If you want to learn what is the purpose of the aforementioned PostgreSQL settings, then this article is a good starting point.
If you’re using MySQL in the cloud and want to scale it to accommodate more traffic from the application, this article from Percona gives you a lot of suggestions for what you can do to achieve this goal.
Get in touch with my latest articles!
The following StackOverflow answers have been trending over the past two weeks:
- What is the difference between Hibernate and Spring Data JPA
- SQL LIMIT vs. JDBC Statement setMaxRows. Which one is better?
- How to register multiple JDBC Types.OTHER mappings when building scalar projections for Hibernate native SQL queries
- How to detect N+1 query issues during testing with JPA and Hibernate
- Hibernate native SQL query type mapping from
- Operand should contain 2 column(s) when fetching data through JPQL using IN & MEMBER OF clause
- ORA-00928 missing SELECT keyword in Oracle