Database Maintenance

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Database Maintenance

Re: Database Maintenance

by ed.j » Sun Apr 28, 2019 11:40 am

I ran "Optimize database (Complete)" and the DB size went from 140MB to 63MB for 18k files / 338GB. Took less than a minute. Not bad at all.

Re: Database Maintenance

by dypsis » Sun Feb 05, 2017 1:35 am

You can do database maintenance by going to File > Maintain Library > Optimize Database.

Re: Database Maintenance

by dtsig » Sat May 16, 2015 10:30 am

I too have noticed lastplayed/count missing in some tracks and vids. I have never found a reason/symptom. It is not consistent enough to run a log or anything else. It just happens

Re: Database Maintenance

by dypsis » Sat May 16, 2015 5:14 am

Peke wrote:
dypsis wrote:And play dates are getting messed up.
Can you clarify that?
Many examples. Try this one...

I am playing The Beatles (Stereo Remaster) which I have been playing since 2009, and MediaMonkey play count for ALL tracks is 0.

Re: Database Maintenance

by dypsis » Wed Apr 22, 2015 1:43 am

Lowlander wrote:If you play files from My Computer it won't track Play History, it will show during the session, but that's it. Files need to be in the Library to have their Play History saved over sessions.
Yes, I know.

Re: Database Maintenance

by Lowlander » Tue Apr 21, 2015 9:55 am

If you play files from My Computer it won't track Play History, it will show during the session, but that's it. Files need to be in the Library to have their Play History saved over sessions.

Re: Database Maintenance

by dypsis » Tue Apr 21, 2015 1:36 am

Example: Sometimes if I played an album yesterday or a couple of days ago, and then I open up MM today, those play dates are not there anymore and only display dates of some time further in the past.

Re: Database Maintenance

by Peke » Mon Apr 20, 2015 8:50 pm

dypsis wrote:And play dates are getting messed up.
Can you clarify that?

Re: Database Maintenance

by dypsis » Sun Apr 19, 2015 4:44 am

And play dates are getting messed up.

Re: Database Maintenance

by dypsis » Sat Apr 18, 2015 11:12 pm

I am not concerned about the size of the database.
I just thought that I may have noticed a difference.

But, I am concerned of ensuring that it stays healthy. :)

Re: Database Maintenance

by MMFrLife » Sat Apr 18, 2015 10:38 am

The general idea of Optimization is to fix little inconsistencies that bog the database down from running smoothly.
Sure, it might compact it/reduce size some after also deleting empty space characters. But I don't think we're talking
differences of, say, from 122mb to 112mb or even 122mb to 117mb for most people (you might get those numbers
if you optimize (complete) after a few years of "frequently" deleting stuff from the database without any maintenance).

Have you or anyone else ever noticed a "significant enough" difference in size to matter much (size wise,
not overall database health) after doing an optimization and pre-optimization comparison test?

Re: Database Maintenance

by wyng » Sat Apr 18, 2015 7:04 am

MMFrLife said: It's not supposed to (that is significant enough to matter).
From here:http://sqlite.org/lang_vacuum.html

"Unless SQLite is running in "auto_vacuum=FULL" mode, when a large amount of data is deleted from the database file it leaves behind empty space, or "free" database pages. This means the database file might be larger than strictly necessary. Running VACUUM to rebuild the database reclaims this space and reduces the size of the database file."

So are you saying that MediaMonkey's complete optimisation does not compact the database?

Re: Database Maintenance

by MMFrLife » Fri Apr 17, 2015 8:25 am

dypsis wrote:I optimized the database. It didn't make any difference to the size though.
It's not supposed to (that is significant enough to matter).

Re: Database Maintenance

by dypsis » Fri Apr 17, 2015 4:19 am

Yes, you're right.

Re: Database Maintenance

by wyng » Fri Apr 17, 2015 1:16 am

I optimized the database. It didn't make any difference to the size though.
No surprise really. If you perform a pragma integrity check on an MM database after complete optimisation you'll probably find a load of missing references (that shouldn't be there). MM is the only SQLite database that I have which fails the test.

Top