Page 1 of 1

[Solved] - Optimize SQLite Database after Deletion?

Posted: Tue Aug 18, 2015 11:17 pm
by keithglong
Hi All,

I am currently working on an app with an SQLite database. I am able to add images as blobs without any issues. However, upon removing an image from the database, I notice that the size of the database remains large. Is there a way to optimize (i.e., remove blank space, etc.) an SQLite database upon deletion/modification of data? The database needs to be compressed upon deletion.

In other development environments there are "optimize database" options, so what am I missing with LiveCode?

Thanks, and I am somewhat new to SQLite (having only "dabbled around with it" in the past)...

Best regards,

- Boo
Gulf Breeze, FL

Re: Optimize SQLite Database after Deletion?

Posted: Tue Aug 18, 2015 11:29 pm
by keithglong
Solved! You can utilize the following command to optimize an SQLite database:

Code: Select all

revExecuteSQL gDatabaseConnection, VACUUM
Best,

- Boo