I use SQLite in a java program. While the java program runs, several queries are sent to the database as well as temporary tables are created in memory and then deleted (using DROP).
The problem is that while the number of various operations in the database increases, the memory usage from the java program also increases. As a result, the program crashes at some point with an outofmemory exception. I use PRAGMA temp_store = 2 to keep the temporary table in memory, but I deleted (using DROP tablename) every time before building another one.
Does this have to do anything with the journal the database keeps? How can I solve this problem?