Although there is an SQL Standard, every relational database is ultimately unique, and you need to adjust your data access layer so that you get the most out of the relational database in use.
In this article, we are going to see what you can do to boost up performance when using MySQL with JPA and Hibernate.
Continue reading “9 High-Performance Tips when using MySQL with JPA and Hibernate”
One of my readers has recently asked me about optimizing the
merge entity state transition, and, because this is a great question, I decided to turn it into a blog post.
In this article, you are going to see a shortcoming of the
merge entity state transition and how you can deal with it using Hibernate.
Continue reading “How to optimize the merge operation using update while batching with JPA and Hibernate”
There are many ways you can map a one-to-one relationship with Hibernate. In this post, I’m going to demonstrate which mapping is the most efficient one from a database perspective.
Continue reading “The best way to map a @OneToOne relationship with JPA and Hibernate”
When using JPA, entity state transitions are translated automatically to SQL statements. This post is going to explain when to use
persist and when to use
Continue reading “How do persist and merge work in JPA”
Database connections are not free, and that’s the reason for using a connection pooling solution in the first place. However, the connection pool alone does not solve every issue associated to managing database connections. The application developer must make sure that every
Connection is closed when no longer needed. Behind the scenes, the connection pool gives a logical transaction which, when being closed, it returns back to the pool so that it can be further reused by other concurrent transactions.
A connection leak happens when a connection is acquired without ever being closed.
Continue reading “The best way to detect database connection leaks”