I imagine the side effect is that the database’s size is rather large.
An alternative is to use History Stats sensor to compute the total of a single day’s worth of data (which eliminates the need to set recorder for more than the default 10 days) and then using the Utility Meter integration, with the History Stats sensor, to report daily/weekly/monthly/yearly totals.
The Utility Meter integration stores its data in a database table that’s not subjected to periodic purges.