AnsweredAssumed Answered

Performance impact of full Load or partial load of elements

Question asked by Bir.Singh on Jul 27, 2017
Latest reply on Jul 29, 2017 by rdavin

I am searching elements under a root element in my AF database with certain filters (like root element, element template and attribute value) to find active instruments and want to use the searched elements to create weak references of them under another root-level element in the same AF database. Am using AFElementSearch constructor and FindElements method to find elements with full load = false.

 

AFElementSearch elementSearch = new AFElementSearch(database, "FindActiveEquipments", new[] { rootElementToken, descToken, templateToken, valueToken });

IEnumerable<AFElement> searchedElements = elementSearch.FindElements(0, false, 1000);

foreach (AFElement element in searchedElements)

  {    

          AFReferenceType weakRefType = database.ReferenceTypes["Weak References"];

                AFElement ActiveWellsElement = database.Elements["ActiveEquipments"];

          ActiveWellsElement.Elements.Add(element, weakRefType);

          database.CheckIn();

}

 

How performance would impact when I full load or partial load searched elements on FindElements method considering 10k elements to search and expecting maximum 1k elements in search results?

Outcomes