Performance degradation

As a newbe on HA I have restarted several times from scratch getting the various parts of my HA right. However at a certain point you want to build on what you have an let it run in the backgroud as it is meant to be.

I however noticed several times that the performance degrades after some time. The database grows pretty rapidly to aound 1.8 GB for my house, which should not be an issue on a raspberrypi 4.

However I have the feeling that things do not get completely cleaned up after removing some integrations, devices or other stuff. The HA system starts waiting for certain responses that just time out since they no longer exist.

Are there some ways to check this? or even cleanup the platform? or is the only way out to start from scratch again?

I adjusted recorder settings to deal with this.
Specifically on my RasPi installs I turn this off to save SD Card from being killed by the writes. On PC this is not issue.

I think the RasPi is really hardware minimum and functions well but for larger installs this may not be enough.

Thanks for the advice!

It put me towards this best hardware list for HA, which seems like a pretty good read