I have a performance issue when calling getInt inside a ResultSetExtractor. GetInt is called 20,000 times. The cost of one call is 0.15 ms, the total cost is 24 seconds, and inside the profiler. Executing SQL queries takes about 8 seconds (access to the Primary-key). I am using mysql driver version 5.1.13, mysql server 5.1.44 and spring -jdbc-3.1.1 Do you have an idea to improve performance?
mut.getMutEffect()[0]=(rs.getInt("leffect_a") != 0); mut.getMutEffect()[1]=(rs.getInt("leffect_c") != 0); ... mut.getMutEffect()[19]=(rs.getInt("leffect_y") != 0); mut.getMutReliability()[0]=rs.getInt("lreliability_a"); ... mut.getMutReliability()[19]=rs.getInt("lreliability_y");
My diagram looks like this:
CREATE TABLE mutation ( ... leffect_a BIT NOT NULL, lreliability_a TINYINT UNSIGNED NOT NULL, ... leffect_y BIT NOT NULL, lreliability_y TINYINT UNSIGNED NOT NULL, ... ) ENGINE=MyISAM;
Edit: inside getInt, the getIntWithOverflowCheck method is called, which seems expensive. Can these checks be included?
source share