Ashok_NK

Performance / Fastest way to get attribute values

Discussion created by Ashok_NK on Oct 25, 2013
Latest reply on Oct 25, 2013 by pcombellick

Hi

 

Scenario is as follows:

 

I have a few hundred assets (currently, ~400, there will be 1000+), and I want to retrieve ~ 15 attributes for each asset. What is the fastest way to achieve this using the AF SDK?

 

I want to retrieve the 'current' attribute value; ideally, it could be any point in time though.

 

1 approach I have tried:
I know the 'full path' to each attribute I want to retrieve relative to the af database, I call:

 

  AFAttributeList afAttributeList = new AFAttributeList(paths, this.afDatabase);

 
 var afValues = afAttributeList.Data.RecordedValue(new AFTime(dateTime), AFRetrievalMode.AtOrBefore);

 A sample path would be:
' \fields\field\myfield\myasset\suction'

 

 This has proved to be quite slow (e.g. 20 seconds), so I'm wondering if there's recommended approaches...

 

Thanks

Outcomes