I have a mysql database that contains three pieces of data; time date stamp, temperature and location of sensor. Every day I would like to maintain the data and only keep historical low,high and average temperature in my database from the past. What functionality within mysql should I be looking at to do this?
Thanks
To make this work I would advise you to use MySQL scheduler and trigger a stored procedure that would either:
clean up your table and leave only the low,high and average values;
OR
move all relevant data (eg low,high and average values) to annother table which would then hold only that "relevant" data.
One other thing: MySQL maybe isn't the best option for storing sensor data. A NoSQL solution like Cassandra should be a better suited solution.
Maybe this could help You regarding that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.