At the microlevel:
You have one or more sensors sending updates every 1s-2s as result crashes the DB.
You can use an SQL query to find it.
You can delete all rows you found from Developer Tools>Service>Purge Entity.
At the macrolevel:
DB size control is a big problem!
Some sensors send updates every 1-2 seconds, and some sensors send data every 2-3 hours. For some sensors, you need to keep all data, and for others, not.
For example, for the binary sensor “door close”, you need only data with state changes. For the temperature sensors, you need the last month in the resolution mean for ~10 minutes, not every 10 seconds. So you do not really need 99% of the stored GBs of data…
I think there is no real, easy-to-use solution for it. I spent a lot of time trying to find a solution.