How to execute SQL functions with multiple parameters in a JPQL query with Hibernate

Introduction

In this article, we are going to see how you can execute SQL functions with multiple parameters in JPQL queries with Hibernate. I recently stumbled on this requirement while answering this StackOverflow question which is a never-ending source of inspiration for articles on my blog.

Continue reading “How to execute SQL functions with multiple parameters in a JPQL query with Hibernate”

How to improve statement caching efficiency with IN clause parameter padding

Introduction

Recently, I stumbled on the following Twitter thread:

This jOOQ feature is indeed really useful since it reduces the number of SQL statements that have to be generated when varying the IN clause parameters dynamically.

Starting with Hibernate ORM 5.2.18, it’s now possible to use IN clause parameter padding so that you can improve SQL Statement Caching efficiency.

In this article, I’m going to explain how this new mechanism works and why you should definitely consider it when using a relational database system which supports Execution Plan caching.

Continue reading “How to improve statement caching efficiency with IN clause parameter padding”