I am trying to compare the performance of the different calls (getBytes/getBinary/getBlob) for getting data out of a BLOB column.
What I am doing right now is tracking the time to execute the statement via the jdbc driver and iterating through the resultset.
//Mark time
ResultSet resultSet = stmt.executeQuery(query);
resultSet.getBytes(1) // or resultSet.getBinary or resultSet.getBlob
//Mark time again
This is a very inaccurate way of doing things because once I run the first query, the consecutive calls tend to be faster because of the DB engine's caching.
Is there a better way to do a performance evaluation of these different calls?