Keyset Pagination with Spring

Introduction In this article, I’m going to show you how you can use the Keyset Pagination technique with Spring or Spring Boot. While the default offset-based pagination provided by Spring Data PagingAndSortingRepository is useful in many situations, if you have a large result set that you have to iterate over, then the Keyset Pagination or Seek Method technique provides better performance.

The best way to write a custom Spring Data Repository

Introduction In this article, I’m going to show you the best way to write a custom Spring Data Repository. While the default JpaRepository methods, as well as the query methods, are very convenient in many situations, there might be times when you need custom Repository methods that can take advantage of any JPA provider-specific functionality.

Default Database Primary, Foreign, and Unique Key Indexing

Introduction In this article, we are going to see what is the default database Primary, Foreign, and Unique Key indexing strategy when using Oracle, SQL Server, PostgreSQL, and MySQL. So, if you are wondering whether one of those top relational databases creates a default index whenever you are adding a Primary Key, Foreign Key, or Unique Key constraint, then this article is going to provide you with the answer you’ve been waiting for.

The best way to log SQL statements with Spring Boot

Introduction In this article, I’m going to show you the best way to log SQL statements when using Spring Boot. Logging SQL queries is very important, as it allows you to validate the number of generated statements, the syntax of the auto-generated queries, as well as prove that JDBC batching works as expected.

High-Performance Java Persistence Newsletter, Issue 33

Introduction 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.