~/devreads

#cursor cache

4 posts

22 Apr 2021

lukaseder 1 min read

A problem few developers are aware of is the possibility of running into “cursor cache contention” or “execution plan cache contention” problems when using IN lists in SQL. The problem that is described in lengths in previous articles, can be summarised as this. All of these are distinct SQL queries and need to be parsed … Continue reading Use IN…

jooq-in-usesqlcursor cacheexecution plan cacheexecution plans

13 Apr 2018

lukaseder 1 min read

In a previous blog post, I wrote about why you should (almost) always default to using bind variables. There are some exceptions, which I will cover in another follow-up post, but by default, bind variables are the right choice, both from a performance and from a security perspective. In this article, I will show an … Continue reading When Using…

sqlbind variablescursor cachedynamic sqlexecution plan cache

12 Apr 2018

lukaseder 1 min read

A common problem with dynamic SQL is parsing performance in production. What makes matters worse is that many developers do not have access to production environments, so they are unaware of the problem (even if there’s nothing new about this topic). What exactly is the problem? Execution plan caches Most database vendors these days ship … Continue reading Why SQL…

sqlbind valuesbind variablescursor cacheexecution plan cache

30 Mar 2017

lukaseder 1 min read

Hah! Got nerd-sniped again: https://stackoverflow.com/questions/43099226/how-to-make-jooq-to-use-arrays-in-the-in-clause/43102102 A jOOQ user was wondering why jOOQ would generate an IN list for a predicate like this: Java SQL … when in fact there could have been the following predicate being generated, instead: In the second case, there would have been only one single bind variable instead of 4, and … Continue reading SQL IN…

sqlarraysbind variablescursor cacheexecution plan cache