을 사용하여 일괄 데이터 삽입 (한 번) 코드입니다, 현재 사용하고 있습니다,하지만 내 삽입 속도를 높이는 방법을 찾고 있는데 처음으로 100 개 이상의 행을 삽입했습니다 ... any 생각?안드로이드 : SQLite
public class SQLiteAdapter {
private SQLiteHelper sqLiteHelper;
private SQLiteDatabase sqLiteDatabase;
private Context context;
public SQLiteAdapter(Context c){
context = c;
}
public long insert(String empId, String name......)
{
ContentValues contentValues = new ContentValues();
contentValues.put(KEY_EMP_ID, empId);
.....................
.....................
.....................
return sqLiteDatabase.insert(KEY_TABLE, null, contentValues);
}
public void InsertReciters()
{
//currently, this is how i am doing, how can i speed up inserting the rows in to db?
//i have 100+ rows ..........
this.insert("ac123", ................);
this.insert("ac133", ................);
this.insert("ac143", ................);
this.insert("ac153", ................);
this.insert("ac163", ................);
.................
.................
}
}
당신은 미리 채워진 데이터베이스를 사용할 수 있습니다 http://stackoverflow.com/a/9109728/265167을 –
감사 Yaqub 1+ –
준비된 문 및 거래 : HTTP : // 유래. com/a/29797229/3681880 – Suragch