Saturday 29 April 2017

java - Inserting to Sqlite is slow

I am new to Database.




I am tying to insert 22000 word to a sqlite DB but it is taking forever to complete



for (int i=0;i    String sql = "INSERT INTO WORD (word) VALUES ("+"'"+s.get(i)+"'"+");";
statement.executeUpdate(sql);
}


Table name is WORD and field name is word(which is a String)

Here s is an arrylist and s.get(i) returns a string... I have made the connection and trying to update
the table.



It is very slow. What am I doing wrong?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...