Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using SPSiteDataQuery to get all matched items from all lists in site collection. Results set is really large, so I want to limit the results to 1000 or 10K, process these items and then iterate through remaining matched items. I am looking for somewhat similar property to ListItemCollectionPosition in SPQuery, that will allow to loop through the result-set till all items are processed.

Or is there any way in which I dont have to get all result-sets at once, and then get 10K results and process them in loop till all matched items are done processing. I really dont want to get 1 million results at once.

Thanks

share|improve this question

1 Answer 1

Sorry but SPSiteDataQuery only supports limiting the number of results not paging to the next set.

If you're using 2010 Server you can use ContentIterator

But if you're using Foundation then your only option is to put some hidden column into all the lists which you can use to break the items into sets.

share|improve this answer
    
That's a dirty workaround but sadly true. +1 –  Hugh Wood Dec 5 '12 at 20:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.