private void prepareConnectionForBulkInsert(SQLiteConnection cn)
{
SQLiteCommand stmt;
stmt = new SQLiteCommand("PRAGMA synchronous=OFF", cn);
stmt.ExecuteNonQuery();
stmt = new SQLiteCommand("PRAGMA count_changes=OFF", cn);
stmt.ExecuteNonQuery();
stmt = new SQLiteCommand("PRAGMA journal_mode=MEMORY", cn);
stmt.ExecuteNonQuery();
stmt = new SQLiteCommand("PRAGMA temp_store=MEMORY", cn);
stmt.ExecuteNonQuery();
}
source
share