The Performance Impact of SQL’s FILTER Clause

I've found an interesting question on Twitter, recently. Is there any performance impact of using FILTER in SQL (PostgreSQL, specifically), or is it just syntax sugar for a CASE expression in an aggregate function? https://twitter.com/Ivan73965858/status/1622487080088600576 As a quick reminder, FILTER is an awesome standard SQL extension to filter out values before aggregating them in SQL. … Continue reading The Performance Impact of SQL’s FILTER Clause

Imperative Loop or Functional Stream Pipeline? Beware of the Performance Impact!

I like weird, yet concise language constructs and API usages https://twitter.com/nipafx/status/1055451667079008256 Yes. I am guilty. Evil? Don't know. But guilty. I heavily use and abuse the java.lang.Boolean type to implement three valued logic in Java: Boolean.TRUE means true (duh) Boolean.FALSE means false null can mean anything like "unknown" or "uninitialised", etc. I know - a … Continue reading Imperative Loop or Functional Stream Pipeline? Beware of the Performance Impact!

Benchmarking JDK String.replace() vs Apache Commons StringUtils.replace()

What's better? Using the JDK's String.replace() or something like Apache Commons Lang's Apache Commons Lang's StringUtils.replace()? In this article, I'll compare the two, first in a profiling session using Java Mission Control (JMC), then in a benchmark using JMH, and we'll see that Java 9 heavily improved things in this area. Profiling using JMC In … Continue reading Benchmarking JDK String.replace() vs Apache Commons StringUtils.replace()

What you Didn’t Know About JDBC Batch

In our previous blog post "10 Common Mistakes Java Developers Make When Writing SQL", we have made a point about batching being important when inserting large data sets. In most databases and with most JDBC drivers, you can get a significant performance improvement when running a single prepared statement in batch mode as such: PreparedStatement … Continue reading What you Didn’t Know About JDBC Batch