Performance of PI data summary calculations

Discussion created by AlistairFrith on Jun 7, 2013
Latest reply on Jun 13, 2013 by jlakumb

We have a project that requires summary calculations (min/max/average) on data that has been retrieved from PI and potentially then adjusted. The way we are doing this is...

  1. Obtain the target AF asset and attribute.
  2. Request time-seriese data for the attribute
  3. Potentially perform manipulations on the data retrieved (eg removing spikes)
  4. Calculate a selection of average, max, min, count above, etc. on the adjusted data, using the PIValues.Summary() method. There are some calculations that are not supported by Summary() and we obviously have to do those ourselves.

Trouble is, this is hugely slow! We are suspecting that  PIValues.Summary() actually sends the values back to the PI server each time. In which case it may be more efficient for us to implement the calculations ourselves.


Does anyone have any advice on the most efficient way to do this. It is not unusual for the users to ask for a report summarising a year's worth of data for 7000 assets, with average, minimum and maximum for 2 data streams at each site. This report takes several hours to run!


--- Alistair.