Absolutely. I have a database now of 16GB large. 75% is LTS and big portion I never use. So would love to get rid of the entities I,do not need. If purging is not possible, at least give us the opportunity to set the State Class different from Measurement - Total - … But there is today no way of changing that.
Next to that purging-repacking a database large like this always ends up in a corrupt database. So making things a bit easier to work in the standard database would be very helpful.
This piqued my curiosity so I ran sqlite3_analyzer on my HA database to see how much of its total ~900MB was being used by statistics. Including indices, mine is slightly more than half; not including indices, a third. For reference, I have over 2600 entities of which about half are in the “sensor” domain. My HA installation is over five years old. 12GB of LTS seems like quite an accomplishment.
*** Table STATISTICS and all its indices **************************************
Percentage of total database...................... 54.3%
Number of entries................................. 19854534
Bytes of storage consumed......................... 482836480
...
*** Table STATISTICS w/o any indices ******************************************
Percentage of total database...................... 32.7%
Number of entries................................. 6618178
Bytes of storage consumed......................... 290721792
Given this number can never go down, having an option to, for example, “Keep n years of historical statistics data” might be a useful option to people that don’t need the data, or that need to keep the database from growing indefinitely, as the growth rate depends on how many sensors you have.