0
Efficient querying for calculated interval data
Forum / Questions & Answers
We have a calculation writing 11 tags every 5 minutes to it's own dataset for our BI team. Since the historian is write-by-exception only, when querying this 5m data, they need to use average aggregation (currently TimeAverage2) to get a value per row.
- Is the API/View service smart enough to not actually perform an average calculation if there is only 1 value within the interval?
- Is there a better aggregation option that would "fill in the gaps" for data that was not written due to the value not changing?
Just want to make sure we are not spending any unnecessary resources querying this data.
1 reply
-
Hi ,
The resources to perform that aggregation would be extremely minimal, but if you were looking for something else, you could just use a 5m StartBound or EndBound aggregate. It would return the first or last value of the interval without having to perform any type of calculation. Being that there is only one value per 5m, it should return the same result as the TimeAverage2 aggregate.