~/devreads

#query

4 posts

26 May

20 Sept 2023

vladmihalcea 1 min read

Introduction In this article, we are going to see how we can find the source of an SQL query generated by Hibernate. Knowing where a given SQL query originates from is very useful when trying to investigate performance issues caused by either long-running queries or queries that are executed excessively (e.g., N+1 query issues). Hypersistence Utils This feature that we…

hibernatequerysqlstacktrace

14 Mar 2023

vladmihalcea 1 min read

Introduction In this article, we are going to see how Spring Data query methods are built, when you should use them, and especially when you should avoid them. I decided to write this article after answering this StackOverflow question, which depicts an 87-character-long Spring Data query method. TL;DR, Don’t write query methods that cannot even fit on the screen. Spring…

springhibernatequeryquery methodspring data

14 Nov 2014

lukaseder 1 min read

We’ve recently encountered this interesting use-case on the jOOQ user group. How do you discover all primary keys of your schema via the jOOQ API? There are two ways: Using the generated meta data Using runtime meta data Let’s see how it works: Using the generated meta data This is straightforward. If you’re using Java … Continue reading jOOQ Tip…

jooq-in-useinformation schemajooqmeta dataquery