Have you seen this? I'm not sure if this is version-specific, but it does seem to indicate that your plugin can't just turn auto_vacuum on and off on the fly.
More at: http://sqlite.org/pragma.html#pragma_auto_vacuum
One thing I was thinking might be handy, since I'm doing it already in a roundabout way: Having the ability to schedule a nightly database maintenance operation from within LMS, much the same as we can do a nightly library rescan. In fact, ideally you'd be able to run it right after the scan has run, both to avoid running them simultaneously, and also to optimize the library database for that day's use.
Auto-vacuuming is only possible if the database stores some additional information that allows each database page to be traced backwards to its referrer. Therefore, auto-vacuuming must be turned on before any tables are created. It is not possible to enable or disable auto-vacuum after a table has been created.
One thing I was thinking might be handy, since I'm doing it already in a roundabout way: Having the ability to schedule a nightly database maintenance operation from within LMS, much the same as we can do a nightly library rescan. In fact, ideally you'd be able to run it right after the scan has run, both to avoid running them simultaneously, and also to optimize the library database for that day's use.
Comment