On Sun, Oct 26, 2008 at 8:17 PM, Mohit Sindhwani <[EMAIL PROTECTED]> wrote: > I'm setting to to delete a bunch of old records ever 2 weeks in a cron > job and initially I just wanted to do delete * from table where > datetime(created_on, 'localtime') < some_date. > > Then, I remembered about vacuum - do I need to vacuum the database > whenever I delete the records? Should I just 'exec' the statement by > setting the sql to "delete .... something ... ; vacuum;" and execute > that? Is that the recommended approach? >
vacuum shrinks the database size by removing empty pages. sqlite will normally reuse empty pages - so vacuum is only useful if you don't plan to insert anything else, otherwise it will be slower. -- Cory Nelson http://www.int64.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users