The code you have is creating new character arrays and copying characters for each String object. An alternative is to create one big String object from the entire rec: String everything = new String(rec); Then create substrings for each setString. For example: pstmt.setString(1, everything.substring(0,1)); pstmt.setString(2, everything.substring(1,8)); Under Sun's current implementation, all of the String objects will share the same character array, ...