noSQL database

I’m quite new to HA, and I’m running on a RPI4 8GB so resources are quite limited mainly due to the SD.

I read all regarding LTS, and it make sense to downsample signals after a certain period to reduce disk usage.

It would be great if data could be dropped/fetched from an external noSQL db (maybe also before downsample, or depending on the configuration)
Also dropping into simple csv could be a solution to avoid huge DB.

The idea is that if you want an hystory graph you can wait a couple of seconds till data are loaded.
Using the csv solution data could be stored in a simple NAS