Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

VACUUM-like database cleaning possible? #8

Open
fredlcore opened this issue Oct 23, 2022 · 4 comments
Open

VACUUM-like database cleaning possible? #8

fredlcore opened this issue Oct 23, 2022 · 4 comments

Comments

@fredlcore
Copy link

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?

@siara-cc
Copy link
Owner

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.

@fredlcore
Copy link
Author

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!

@siara-cc
Copy link
Owner

Another way is to create new DB after certain number of records and deleting older files. But this will create multiple DBs for reading.

@fredlcore
Copy link
Author

Yes, but that will create quite some overhead in code where flash memory is already constrained :(...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants