1 (edited by AD1408 2016-10-28 02:24:06)

Topic: Vacuum

Hi Guys,


I was trying to implement vacuum database button in a test project, inspired from Mathias' code. I have done something it seems working but not sure if its done correctly. This one aims to vacuums all database on click. For vacuuming individual table please see Mathias post here.
http://myvisualdatabase.com/forum/viewtopic.php?id=2089


Starting blank db size was 4k
Added large text  of 1.2MB (full text of Moby Dick) and MVD db file gone up to 2MB
Then I added 10 .jpg images (size in total 2.6MB) db file size gone up to 4MB
So in total I added about 3.8 MB worth data then deleted the records. After vacuum db size gone back to 4k

Just wandering if this implementation is correct and safe?


---------------------------------------------
edit:


I think I sorted out on click warning message thing, thanks to Mathias script. I have deleted previous incomplete sample project and attached what I think complete one... Still needs to be checked though if I did it correctly before applying to actual projects.

Post's attachments

Attachment icon Vacuum 2.zip 6.49 kb, 376 downloads since 2016-10-28 

Adam
God... please help me become the person my dog thinks I am.

Re: Vacuum

Hello.


It's ok.
Here you can find more info about vacuum
http://sqlite.org/lang_vacuum.html

Dmitry.