Meismart
9 years agoCreator III
Best way to add 30,000 Records
Please can you help with a clever way to add 30,000 related items to an item. (AML Part Structure)
<Item type="MasterList">
<Relationships>
<Item type="MasterList_Part"><properties...></Item>
</Relationships>
</Item>
I have Millions of lines of application which I am resolving into tens of thousands of parts.
Currently I have logic that matches the application to the parts and this gives me my gap/changes which I can manage - up to 10,000 records can change during normal operation.
Unfortunately under certain circumstances, I need to add anywhere up to 200,000 related Items. Which I can split it down to chunks of approximately 30,000 related items.
I am using: (C#)
for (I=0; I<SQLResult.getItemCount(); I++)
{
Innovator inn = this.getInnovator();
Item relpart = inn.newItem("MasterList_Part", "add");
relpart.setProperties("...","...");
relpart = relpart.apply();
}
This approach works, however it is taking 20 minutes to add 30,000 records, as it makes a separate call for each iteration of the loop. Is there a recommended way to add multiple child parts to an existing parent Item.
eg. setRelatedItem, appendItem, etc.