i have Grafana 9.4.7 installed on my Raspberry Pi 4B with 64bit Raspian OS
My Problem: I have a query for Power Consumption per Month for the last 3 Months. Grafana is calculating very long for this Query with the result that i get a Query Timeout.
Are you sure that difference() is the right function for this? Since you are recording data every minute, the difference() function is not going to calculate the difference between the first and last unless one defines the first and last points of the month (which one can do). I would think spread() would work, so long as your readings are always rising over the month, correct?
my readings from the electrity meter are also every minute (60 seconds), so i calculate the summary for 1 month and use difference for the difference to the last month.
So far this work for me, i can test spread instead of difference
Solar and Power
Solar with the Fields ampere, voltage e.g. and added for Solar a device1 Tag Shelly EM so it´s indexed
Power is from the Electric Meter with only 2 fields TotalPmeter and Watt. I also added here device2 Hichi as a Tag