Page 1 of 2

Database Maintenance

Posted: Sun Apr 12, 2015 3:22 am
by dypsis
My database is now 122 MB. To me, it seems big for a database.

Is there any maintenance that can or needs to be done on it to keep it small and healthy like (for example) Microsoft Access databases?

Or do I just carry on.... ? :wink:

Re: Database Maintenance

Posted: Sun Apr 12, 2015 4:15 am
by popsmike
The easiest method i think most people use is...
File > Maintain Library > then make sure Optimize database (Complete) is ticked then OK it.

This should do a decent clean for you but the database size does get quite large depending on how albums etc you have.

Re: Database Maintenance

Posted: Sun Apr 12, 2015 8:34 am
by MMFrLife
As suggested, do the optimization on it periodically for the "health" part.
As far as the "size", no need to worry. MM can handle it :)
[122 MB is fairly small compared to many MM users]

Re: Database Maintenance

Posted: Tue Apr 14, 2015 2:05 am
by dypsis
Thanks guys.

I'll check that out.

Re: Database Maintenance

Posted: Tue Apr 14, 2015 8:51 am
by dtsig
dypsis wrote:My database is now 122 MB. To me, it seems big for a database.

Is there any maintenance that can or needs to be done on it to keep it small and healthy like (for example) Microsoft Access databases?

Or do I just carry on.... ? :wink:
Microsoft Access <G> .. My db is approx 850m right now and that is middle of the road with this gang. There has been no problem from the db. Just do the maintenance as mentioned and do backups ..

Re: Database Maintenance

Posted: Tue Apr 14, 2015 2:23 pm
by imagehopper
With all the information mm puts in the tags you must have 2000 songs :lol:

Re: Database Maintenance

Posted: Fri Apr 17, 2015 12:28 am
by dypsis
Thanks guys.

I optimized the database. It didn't make any difference to the size though.

Re: Database Maintenance

Posted: Fri Apr 17, 2015 1:16 am
by wyng
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.

Re: Database Maintenance

Posted: Fri Apr 17, 2015 4:19 am
by dypsis
Yes, you're right.

Re: Database Maintenance

Posted: Fri Apr 17, 2015 8:25 am
by MMFrLife
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

Posted: Sat Apr 18, 2015 7:04 am
by wyng
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

Posted: Sat Apr 18, 2015 10:38 am
by MMFrLife
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

Posted: Sat Apr 18, 2015 11:12 pm
by dypsis
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

Posted: Sun Apr 19, 2015 4:44 am
by dypsis
And play dates are getting messed up.

Re: Database Maintenance

Posted: Mon Apr 20, 2015 8:50 pm
by Peke
dypsis wrote:And play dates are getting messed up.
Can you clarify that?