SPList.Items.GetItemById(ID) – loads the entire set of list items to the memory and select the given item
And
SPList.GetItemById(ID) – just get the given item
We have used the Items.GetItemById in a workflow and failed miserably. It runs for about 5 mins and times out.
When we changed that to the SPList.GetItemById, it ran under 20 sec.
There are some more SPList query improvement methods are available and you can find those just by googling.
No comments:
Post a Comment