Since you are using a time your could try using a trigger which deleted the row with the oldest (lowest) time. You would need to have an index on the timestamp. I guess something like timestamp > 0 LIMIT 1 might work.

Sean Machin wrote:
Hi All,

I'm considering using SQLLite for an embedded project. Some of the data I'd like to store is timestamped sensor readings. I'd like to know if there is a way to configure a table so that it acts like a fixed length FIFO queue, e.g. stores 10,000 records then once full
drops off the oldest record each time a new one is inserted.

Can anyone tell me if we can do that with SQLLite?

Thanks,
Sean

Reply via email to