sqlite_micro_logger_arduino
sqlite_micro_logger_arduino copied to clipboard
VACUUM-like database cleaning possible?
First of all, thank you for providing this library! It's almost exactly what I'm looking for, but one thing I couldn't find out is how to deal with deleting log rows that are older than a certain amount of days and at the same time freeing the space taken up by these entries, much like the DELETE and VACUUM statements in sqlite3. Or is there any other way I could deal with the fact that I just want x days worth of data in the database without creating new database files every x days?
Hi sorry I saw this only now. It seems I haven't been getting notifications as I was not a Watcher for this repo. Creating a new db using this library and copying only the needed records is equivalent to VACUUM.
Creating rolling logs has been in my TODO list for this repo but have not been able to get to it yet.
Ok, thanks. Copying only selected data into a new DB could be a workaround, but if you should find the time to add a direct implementation for VACUUM, please let me know here :)! And thanks again for your work on this library!
Another way is to create new DB after certain number of records and deleting older files. But this will create multiple DBs for reading.
Yes, but that will create quite some overhead in code where flash memory is already constrained :(...