I'm currently trying to reduce the size of my database by deleting records from my sqlite database in my iOS application but the size will stay the same (size of all the files associated with the database, i.e. the .sqlite file, the .sqlite-shm file and the .sqlite-wal file). I have read that this is the expected behaviour (Ref: change sqlite file size after "DELETE FROM table"). This link suggests to use the sqlite "vacuum" tool and this should clean up the unused memory fragment. However, by doing this, this allocates a lot of memory in the rollback on disk memory (more specifically, the .sqlite-wal file). So this doesn't help since the total size of the files associated with the database didn't decrease.
I was wondering if anybody has any idea what to do in that case? Any help is appreciated.
Thanks
JB