i have to parse huge data from xml files from a loop and insert values into sqlite database. i am thinking of instead of calling :
PreparedStatement ps = conn.prepareStatement("insert into "+TABLE_NAME+" ("+NAME_COL+", "+AGE_COL+", "+ADDRESS_COL+", "+GENDER_COL+") values (?, ?, ?, ?)");
each iteration in the loop, to add the values into list and pass it to the method that does record insertion.
my question is, should i create a "new" list after every record insertion or remove all elements in the list and reuse it. which suits huge data manipulation and yields good performance
Aucun commentaire:
Enregistrer un commentaire