我每秒都会将传感器数据写入到influxdb数据库中。在grafana中显示每周、每月或每年的摘要相当慢,因为它需要查询数千个值。 为了加快速度,我正在考虑使用一个cron作业来运行如下查询 select mean(sensor1) into data_avg_1h from data where time > start and time <= end group by time(1h)
select mean(sensor1) into data_avg_1d from data where time > start and time <= end group