By default, Home Assistant saves your sensor history database to /config/home-assistant_v2.db, which is located in your local HDD/SSD/memory card/other media. This is usually most responsible for writes and reads in Home Assistant, as when more and more sensors are added, the local media comes more and more busy. This may cause performance problems or performance degradation.
I save my Home Assistant sensor database to RAM to mitigate this. You can do this with adding the following to your /config/configuration.yaml:
recorder: db_url: 'sqlite:///:memory:'
It’s fast as it can get to have the database in RAM, but it gets wiped every time reboot happens. This is not problem for me though, as I use InfluxDB and Grafana for more long term tracking of sensor data.
Try it, it’s really fast.