views:

60

answers:

1

I added a new field (type BLOB) to an sqlite table and the table size doubled from 50mb to 100mb. the field doesn't have any data in it yet.

anyone know why this would happen?

thanks for any help.

+1  A: 

Compressing an SQLite database is done with the VACUUM; command (just run it as a query with sqlite3_exec if you're using the API, or directly in the console).

You can also set the database to autovacuum, but this will slow down all modifications terribly. Better to do your operations then run the vacuum command if need be, but that's a matter of opinion.

MPelletier