I have a program that runs continuously and stores data in a SQLite database every second. I want to change this and use a memory database that is saved to disk every 15 minutes.
My program is written in Java and I am using the library
I found out that the first time I write to a file, I can use "SQLiteConnection.initializeBackup (File)" and then DROP and CREATE tables in memory and possibly use VACUUM to clear memory. It works well, but then it gets tricky ... How do I add / merge new data from the memory-database after another 15 minutes to an existing file?
Is there a standard approach for this? Would it be good practice to just fetch all data from each table into db memory (and lock it to prevent further inserts), skip it, and insert into the db file?
No one has answered this question yet
Check out similar questions: