This is an automated archive made by the Lemmit Bot.

The original was posted on /r/homeassistant by /u/mfalkvidd on 2025-10-21 10:25:53+00:00.


3 years ago, there was a discussion in https://www.reddit.com/r/homeassistant/comments/xyjvge/show_statistics_for_more_than_10_days_in_a/ about keeping statistics for longer than the default 10 days.

I “fixed” it by setting purge\_keep\_days to 36500. So now my database has been accumulating for 3 years.

The result is that I currently have a sqlite database that is 6.8GB. Everything is working fine. I have not noticed any slowdowns, and the cpu load is about 30% of a single core of the entire server, which runs more stuff than just HA. But keep in mind, I am running HA on a server with a 12 core i5 1140, 128GB ram and the database is on a NVMe SSD. There are better ways of solving retention (see original discussion), but this is a simple and working solution for me.

As always, thanks a lot to the HA community for great support. HA is great software, but the community is really what makes it fantastic.

Tagging @GCUArmchairTraveller @MovieImpossible8224 @zSprawl @iWQRLC590apOCyt59Xza @Engineer_on_skis who were part of the original discussion in case you are interested in this follow-up. I would have posted in the original discussion if it wasn’t locked.