Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Throttling issue in sharepoint list

$
0
0

HI

I have lot of pages>5000 and will be increasing steadily.My caml query is as follows 

“<Where>  <Or>       
  <Eq> <FieldRef Name='LinkedId'  LookupId='TRUE'/><Value Type='Lookup' >1</Value></Eq>        
 <Eq><FieldRef Name='ID' /><Value Type='Counter'>1</Value></Eq>
 </Or></Where>”

LinkedId is custom self lookup field.I have set the indexing true on this field.

The number of items the query will return at any time will not be  more than 2000

Now the issue is when we run simple query like

list.getitems(query) we get  "listviewthreshhold" error but I don't understand when both the fields are indexed why I am getting throttled exception.

Secondly then I tried to use contentiterator 

 ContentIterator iterator = new ContentIterator();

  iterator.ProcessListItems(list, ProcessItem,
        ProcessError);//this one works and it process the list for all items

            iterator.ProcessListItems(list,camlQuery, ProcessItem,
        ProcessError);//this one doesn't work and throws exception "exceeds the list view threshold"

i don't understand why the second one doesn't work .I read in blogs and documentation that ContentIterator is for traversing large list without disabling throttling but with camlquery specified that is also not working

I have added view tag in above camlquery while using with contentiterator

Now the questions are 

Am I missing something in content iterator that it is not working?

Is there any way to disable throttling temprarily and get the result and enable throttling?

I don't want to change current user permission level  or change the throttling limit


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>