db.open(true);
}
// set 1GB cache_size:
final SQLiteStatement stmt = db.prepare("PRAGMA page_size;");
if (stmt.step()) {
long cacheSize = stmt.columnLong(0);
db.exec("PRAGMA cache_size = " + (1024l*1024l*1024l / cacheSize) + ";");
}
stmt.dispose();
db.exec("PRAGMA synchronous = OFF;");
db.exec("PRAGMA journal_mode = OFF;");