fluttersqflitevacuum

Flutter Sqflite Runtime Vacuum


I'm using sqflite database as asset database that contains one table which size is around 5MB. User activities are changing some of the fields in that table.

I'm considering to apply scheduled vacuum command in runtime (on mobile device) to be able to control the application size.

There are limited information on the internet about usage of vacuum command on runtime and mobile devices/apps.

I've checked that "await db.execute('VACUUM');" command is working but couldn't see if it is affecting the db size.

Is there anybody who suggest this or says it is not necessary...

Thank you in advance.


Solution

  • as you know The VACUUM command rebuilds the database file, repacking it into a minimal amount of disk space. I've developed a Podcast player Application named MalangoPod and i've used sqflite and i didn't use Vacuum and i store many informations like podcast subscriptions informations and episode downloaded informations or favorited and playlisted informations and etc. although i send these informations and more than these to the server. but i believe you do not need to use Vacuum because we usually store not heavy infos in local database of the mobile.

    happy coding...