Lukas Eder 5/11/2022

Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries

Read Original

This technical article investigates the potential performance benefits of setting JDBC Statement.setFetchSize(1) for queries known to return only a single row, such as those using fetchSingle() or LIMIT 1. It discusses the rationale from the ORM (jOOQ) perspective and presents normalized JMH benchmark results comparing performance with and without the hint across different databases like Db2 and MySQL.

Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser