On 11 Oct 2010, at 10:26am, Michele Pradella wrote:

>  Soft delete could increase the SELECT speed because you have to check 
> always for the "deleted" column.
> Moreover the DB will grow up without limit if no one physically delete 
> the records: anyway UPDATE of a lot of records could be expensive too.
> I think the only way is to DELETE more frequently less records.

I recommend that you try it.  At least in the command-line application if not 
in your own code.  Deleting a record is very expensive in terms of time and 
resources.  Changing a field from a 1 to a 0 is far cheaper and faster, even if 
it's in an index or two.

You can have a regular task that runs at 4am that deletes all the records with 
a 0 in.  That bit is easy.

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

Reply via email to