Aging data in MySQL - solution?

Does any one have a solution for aging older data in MySQL?

I’m pulling from a number of Temperature sensors, and while the size of the DB is pretty small at the moment it’ll just keep growing.

I assume you could run timed stored procedures in MySQL, but what about from the OpenHab side?

This is on the roadmap to implement for OH 2 (or maybe it was in Habmin 2, can’t remember which) but today there is no way to do this from OH.

I personally use a tiered persistence approach which uses MapDB for restoreOnStartup, rrd4j for stuff I need to chart of get historic data, and only uses MySQL (or some other external DB) for Items that I need to keep the data around forever or expose it to external apps. This means I have no need for DB maintenance at all.

you could look at persisting your sensor readings in a time-series database such as influxdb. It has built in mechanisms to clear out older data, so you don’t have to do it. You just set up the policy.

writing to influxdb is supported within OH.