title: Caml Query RowFilter doesn't work with WHERE conditions - List view threshold
body: <p>I have some troubles with CAML Query on a 8000+ List on Sharepoint. I want to paginate the query in order to avoid this issue. I used this c# code:</p>
  
  <pre><code>List spList = clientContext.Web.Lists.GetByTitle(ConfigurationManager.AppSettings["ListaDocumenti"]);
  clientContext.Load(spList);
  clientContext.ExecuteQuery();
  
  if (spList != null &amp;&amp; spList.ItemCount &gt; 0)
  {
  CamlQuery camlQuery = new CamlQuery();
  string query = @"&lt;View Scope='RecursiveAll'&gt;
   &lt;QueryOptions&gt;&lt;ViewAttributes Scope='Recursive'/&gt;&lt;/QueryOptions&gt;
   &lt;RowLimit&gt;1000&lt;/RowLimit&gt;
   &lt;Query&gt;
    &lt;Where&gt;                                    
     &lt;And&gt;
      &lt;And&gt;                                                    
       &lt;And&gt;
        &lt;Eq&gt;
         &lt;FieldRef Name='p_notifica' /&gt;
         &lt;Value Type='Boolean'&gt;0&lt;/Value&gt;
        &lt;/Eq&gt;
        &lt;Leq&gt;
         &lt;FieldRef Name='p_DataPubblicazione' /&gt;
         &lt;Value IncludeTimeValue='false' Type='DateTime'&gt;{0}&lt;/Value&gt;
        &lt;/Leq&gt;
       &lt;/And&gt;                                                      
       &lt;IsNotNull&gt;
        &lt;FieldRef Name='p_CodiceCliente' /&gt;
       &lt;/IsNotNull&gt;
      &lt;/And&gt;
      &lt;Eq&gt;
       &lt;FieldRef Name='FSObjType' /&gt;
       &lt;Value Type='Integer'&gt;0&lt;/Value&gt;
      &lt;/Eq&gt;
     &lt;/And&gt;
    &lt;/Where&gt;
   &lt;/Query&gt;                                          
  &lt;/View&gt;";
  camlQuery.ViewXml = String.Format(query, date.AddDays(offset).ToString("s") + "Z"/*"2018-10-12T00:00:00Z"*/);
  bool morerecords = false;
  List&lt;SPDocument&gt; list_documents = new List&lt;SPDocument&gt;();
  do
  {
   ListItemCollection listItems = spList.GetItems(camlQuery);
   clientContext.Load(listItems);
   clientContext.ExecuteQuery();
  
   morerecords = listItems.Count == 1000; 
  
   list_documents.Add(...)
  
   camlQuery.ListItemCollectionPosition = listItems.ListItemCollectionPosition;
  } while (morerecords);
  </code></pre>
  
  <p>Lunching this query in production environment (8000+ items), it returns "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator" error, in test environment all works right (&lt;5000 documents).</p>
  
  <p>If I remove the "Where" conditions, it works right but the entire list is returned (with the limit of 1000 items). What can I try in order to paginate with the "Where" conditions enabled?</p>
  
  <p>Thanks</p>