dbikash <[EMAIL PROTECTED]> writes:

> 
> 
> Hello,
...
> However, the delete command "DELETE FROM table WHERE time < XXX" is very
> slow (XXX is in time_t format). VACUUM is even slower. (I need to VACUUM
> since I have a restriction on the database size.) My database has 1 million
> records and is more than 100 MB in size.
> ...
> 
> Thanks,
> Bikash

PS.

Search the SQLite newgroup here:
http://search.gmane.org/search.php?group=gmane.comp.db.sqlite.general&query=abc

Since SQLite re-uses 'deleted' space, you should perhaps only VACUUM
*before* performing any 'purge' deletes - this sounds a bit odd initially, 
but if your DB file has reached a 'steady state' size, with INSERTs
and DELETEs balancing each other on the whole, if you do a VACUUM
/after/ the DELETEs, SQLite will have to re-grow the DB file rather
than just reusing the dead space.

Doing it /before/ will just mop up any residues, and will have less work to do,
and I believe it also does a bit of a 'defrag' - hence you should not do it too
often if execution time of the operation is important.

MikeW


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to