Sqlite - size limit / how to limit database size (fifo)

I read in a tutorial that the sqlite node is limited to 4MB. But I could not find any confirmation on this in the description and it might have changed.

In the tutorial the data was stored on a service called FRED and I think that the 4MB limit for just for FRED. Is there any limits beyond the general limits for the SQLite?

We want to store 3 years worth of data and we therefore want to limit the database. In the same tutorial the following was used to manage the max. size of the database.

In topic:

DELETE FROM RANDOMNUM WHERE TIMESTAMP <= strftime('%s','now', '-1 hours')*1000

I would be grateful for any advice on the best way to go when wanting to limit the database to three years of data?

According to https://www.sqlite.org/whentouse.html " An SQLite database is limited in size to 281 terabytes (247 bytes, 128 tibibytes)."

What system are you running on and how much data are you saving there? Also what sort of data is it? If it is time series data you would be much better storing it in influxdb which is specifically designed for time series data and has built in techniques for getting rid of old data.

However if you do need to use sqlite and get rid of old data then yes, using a DELETE query based on the timestamp is the way to do it. You would have to make sure each record has a timestamp so that you know how old it is.

Thanks Colin,

The way is clear now. Just need to get the details in place now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.