conn.exec("PRAGMA temp_store_directory = '" + new File(".").getAbsolutePath() + "'");
SQLiteStatement st = conn.prepare("PRAGMA temp_store_directory");
st.step();
LOG.info("Changed temp_store_directory to: " + st.columnString(0));
// journal_mode=OFF speeds up insertions
conn.exec("PRAGMA journal_mode=OFF");
/*
* page_size is one of of the most important parameters for speed up indexation. SQLite performs a merge sort for
* sorting data before inserting it in an index. The buffer SQLites uses for sorting has a size equals to
* page_size * SQLITE_DEFAULT_TEMP_CACHE_SIZE. Unfortunately, SQLITE_DEFAULT_TEMP_CACHE_SIZE is a compilation
* parameter. That is then fixed to the sqlite4java library used. We have recompiled that library to increase