The IPIValues2 interface is a secondary interface supported by the PIValues object. The interface includes all the methods of the default PIValues interface as well as the additional methods described here.
The GetValueArray method allows user to get the data in the PIValues as parallel arrays of simple data type. The GetItemAnnotation method allows user to get the annotation for a PIValue in the PIValues collection directly. Both methods allow data access to the PIValues without creating COM objects like PIValue, PITimestamp and NameValues. Hence, these methods are faster than looping for the PIValue objects in the PIValues collection, especially in .NET applications.
However, these methods are designed specifically for PIValues generated from PI data archive or snapshot retrieval calls. You may still need to go through the ValueAttribute of the PIValue to get at the more general data attributes. For example, for PIValues generated by the summaries calls, the ValuesAttribute contains information like PercentGood, MaxTime etc which cannot be accessed by the GetvalueArray and GetItemAnnotation methods.