Speed up JDBC queries by use of automated fetch size calculation
861874May 13 2011 — edited May 23 2011Hi everybody,
I'm the founder and main developer of an open source data access framework called MetaModel. MetaModel interfaces a lot of different data stores, where JDBC is one of them (but also Excel spreadsheets, CSV files, Access database files and more).
Anyways - I wanted to share the idea of a feature in the latest version of MetaModel that I'm very fond of: Automatic calculation of an appropriate fetch size. This will balance the IO performance (eg. the query buffer size) against available memory in the JVM. I've written a longer explanation on my blog, here: http://kasper.eobjects.org/2011/05/speed-up-your-jdbc-queries-with.html
So... What do you guys think of such an optimization? Has it been done before (I haven't seen it)? And is it only Oracle's JDBC driver that actually supports fetch sizing like this? Are there any pitfalls?
Best regards,
Kasper