Huge .db file

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
tchirou
Posts: 17
Joined: Wed Oct 01, 2014 8:05 am

Huge .db file

Post 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
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Huge .db file

Post 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)
tchirou
Posts: 17
Joined: Wed Oct 01, 2014 8:05 am

Re: Huge .db file

Post by tchirou »

Thanks
When you say « going into the .db file itself », how would I technically do that ?
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Huge .db file

Post 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.
SquaTront
Posts: 26
Joined: Sun Aug 04, 2013 3:45 pm

Re: Huge .db file

Post 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
Post Reply