I am working on application in JAVA that gets data from database, makes some calculation and writes data to xml file. Everything is fine with small databases (smaller than 1 GB). However, when I run program with database which is bigger than 1 GB my application is not able to create index in database - it throws SQLException - Database image is malformed. Same in case of retrieving data from database by specific column value.
Code which cause exception:
Statement st = con.createStatement();
st.setQueryTimeout(60);
st.executeUpdate("CREATE INDEX if not exists IX_name ON myTable (name)");
I use driver org.sqlite.JDBC - sqlite-jdbc version 3.8.11. All commands work fine with smaller databases and I have a control over memory - exception is not caused by no memory. I work on Windows 10 and my computer has 8,00 GB RAM. Database which causes exception is big around 1,5 GB. Database is not corrupted (I tried more big databases and all cause same exception).
Can anybody help me? Is there a better driver for accessing large databases?
Thank you for your answers.