Page 1 of 1

Huge .db file

Posted: Fri Aug 24, 2018 10:26 am
by tchirou
Hello

I was wandering in the content of my synology package and I noticed that mylar.db is 1,1GB. I had mylar for a few years : I have 105 comics and 2619 issues. I don't know if it is normal, just wanted to report it :-)

Thanks for your feedback

Re: Huge .db file

Posted: Fri Aug 31, 2018 4:41 pm
by evilhero
It shouldn't cause any problems, but yeah that's a good size db - granted alot of it is probably the search cache holding a lot of items that probably can't be referenced anymore. You could clear the nzblog entries (which are your snatches), but again that's history related so you'll lose all your past snatch references.

There is no way to clear the search cache aside from going into the .db file itself and issuing a command:

Code: Select all

delete from rssdb
which would wipe your entire rss cache entries (Mylar retains all the rss feeds it retrieves so it doesn't have to hit the API excessively if it can be avoided. Of course in doing so, over a large period of time, the size of the .db can get to a rather large size based on just that)

Re: Huge .db file

Posted: Fri Aug 31, 2018 4:45 pm
by tchirou
Thanks
When you say « going into the .db file itself », how would I technically do that ?

Re: Huge .db file

Posted: Fri Aug 31, 2018 5:02 pm
by evilhero
It's fairly simple, from a command line and in the directory that contains the mylar.db file, issue the following command to open up the mylar.db with sqlite3:

Code: Select all

sqlite3 mylar.db
Then type in the folowing commands:

Code: Select all

delete from rssdb;
vacuum;
The first command will remove all the entries from the rss cache. The second command will reclaim any unused space and should shrink the size of your .db to a lesser size.

Re: Huge .db file

Posted: Wed Nov 21, 2018 4:55 pm
by SquaTront
I highly recommend that anyone that has been running mylar for over a year to do this maintenance. Recently, I noticed that mylar was sluggish when starting up. Checked on the size of the database and it was 1.1GB in size. I just cleaned out the database via the sqlite3 commands you posted and I'm now running with a svelte 3MB database. This are snappy again.
:D