Hello everyone! I’ve been exploring ways to optimize my energy data storage in InfluxDB, which is crucial for my Home Assistant setup. After a couple of years of collecting data, I noticed that viewing historical data over a year became sluggish due to the sheer volume of data points. I stumbled upon a solution involving downsampling, which I’d like to share and discuss further.First, I set up a retention policy in InfluxDB to store data indefinitely, which worked well initially. However, as time went on, querying large datasets became a bottleneck. I discovered that InfluxDB recommends downsampling data into different buckets for varying time periods. For instance, keeping high-resolution data (every minute) for the past month and downsampling to 15-minute intervals for the past year, then to hourly data for older records.I followed the official InfluxDB guide on downsampling and created tasks to automate this process. The tasks now run periodically, ensuring that my data remains manageable without losing the granularity I need for recent analysis. This approach has significantly improved the performance of my charts in the Home Assistant sitemap.I’d love to hear from others who have implemented similar strategies. How do you handle data retention and downsampling? Have you encountered any challenges or found any optimizations that I might have missed? Your insights would be invaluable as I continue to refine my setup.Additionally, I’d like to ask if there’s a way to integrate these downsampling tasks more seamlessly with Home Assistant. The current setup involves manually configuring InfluxDB tasks, which is a bit outside my comfort zone. Any advice or resources would be greatly appreciated!Thanks for reading, and I look forward to your feedback!