AnsweredAssumed Answered

Proper way to delete large ammount of values from Pi Archive

Question asked by VarbanVarbanov on Jul 17, 2017
Latest reply on Aug 7, 2017 by gregor

Hi,  following this discussion

 

The PIServerFeature 'Delete Range Feature' is not supported on PIServer 'PI Data Archive '

 

I concluded that for deleting range of values in Pi archive it is better to be used PI Sdk method instead of Af Sdk, because of better performance and no need to retrieve the values first (in case of using archive 2015 or older, not that we need to support it):

 

            point.Data.RemoveValues(piTimeStart, piTimeEnd, DataRemovalConstants.drRemoveAll)



However, a bit of surprise: the method above whan called for a large number of values (cannot tell how large exactly, but genrally if I try to delete the values of 10 hz time series and could even call it for a months of 10 Hz data) the method passes succesfully and throws no errors but the values are still there! In another situation - if delete this 10 hz timeseries using smaller period - it is slow and sometimes timeouts even with 20 min period (12 000 values in Pi).

 

As discussed in the topic above, if AF variation option is chosen (for archive older than 2016) - it is no suitable for deleting large portions of data, because crashes when retrieving the data (and also the performance seems worse that the Pi Sdk version).

 

So, what is the proper way to delete large ammounts of archive values?

 

Thank you in advance for your help!

Outcomes