According to the post HA uses sqlite for sensor data. Why not use a temporal database like InfluxDB, Prometheus, VictoriaMetrics etc?
[1]: https://github.com/VictoriaMetrics-Community/homeassistant-a... [2]: https://github.com/VictoriaMetrics-Community/homeassistant-a...