Dababase size growing with energy

My understanding is that sensor states are used to create the “5 minute” statistics (in the statistics_short_term table), and these are then used to create the long term statistics (in the statistics table) used in the energy dashboard.

Assuming this is correct, technically you would only need to keep at least 5 minutes of sensor data to retain all of the long term statistics. However, purge_keep_days is the only current standard way of deleting sensor data, and it has no granularity over individual sensors - unless you want to run your own delete SQL as done here.

1 Like