Skip to content Skip to sidebar Skip to footer

Updating And Compacting Sqlite Database In Android

I am a bit new to android and I am working on a project which used to have 40 MBs of sqlite database. Now I wanna put blob data of sqlite in raw folder, so my database is now less

Solution 1:

The VACUUM command may be what you want.

This will copy the data to a temporary database and then use this to overwrite the original.

You would use something along the lines of:-

    db.execSQL("VACUUM");

Note the warnings about compatibility in the following:-

SQL As Understood By SQLite - VACUUM

Post a Comment for "Updating And Compacting Sqlite Database In Android"