On 12 Oct 2010, at 6:30pm, Scott Hess wrote:

>  Something like:
> 
>  INSERT INTO my_table VALUES (blah, blah, blah);
>  DELETE FROM my_table WHERE date_or_whatever < some_limit LIMIT 5;
> 
> If your insert load consistently tracks from day to day, this mostly
> looks like a circular buffer.  The main downside is that it makes your
> heaviest insert period also be your heaviest delete period, which is
> unfortunate.

Instead of having a queue length which is an integer number of days, have one 
which is, for example, 7.5 days long.  That way at 3pm you're deleting the 
records which were made at 3am in the morning.

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

Reply via email to