// Change the default temp_store_directory, otherwise we may run out of disk space as it will go to /var/tmp
// In EMR the big disks are at /mnt
// It suffices to set it to . as it is the tasks' work directory
// Warning: this pragma is deprecated and may be removed in further versions, however there is no choice
// other than recompiling SQLite or modifying the environment.
conn.open(true);
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