Clean an in-memory database
-
11-02-2021 - |
Pergunta
I'm using Spring Batch with an HSQLDB in-memory database for Spring Batch metadata. My application needs to run continuously, so this database becomes problematic for my memory. I need a way to clean it periodically. I already thought about using a stored procedure that deletes datas according to a condition (old datas). This procedure is called periodically by a dedicated thread using Spring StoredProcedure class.
If you have alternative solutions, i'm open.
Thanks
Solução
Finally, I used a background task scheduled to run every X minutes. This task uses JDBC to clean the database.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow