0

I have a sharepoint List which contains 20000+ records, I am using REST API to retrieve items based on some filter its working fine, but it take nearly 10 secs for retrieve just 600+ records, I don't know where the problem occurs why its takes long time.

This is the default behavior of Rest API?

I want to sort out this issue , help me on this guys.

function GetPendingItems()
{
    $scope.url =_spPageContextInfo.siteAbsoluteUrl+"/_api/web/lists/getbytitle('COCItemsList')/items?$select=COCID,Title,PatientID,Status,DueDate&$filter=Status ne 'Closed' and Status ne 'NotCase'"
    GetListItems($scope.url,
    function(data)
    {
        $scope.COCPendingItems =  data.d.results
        $scope.FilteredItems = data.d.results;  

        $scope.$apply();

},
function(error){},
true);
}function GetListItems(url,complete, failure, isAsync) {

      // Executing our items via an ajax request
      $.ajax({
          url: url,
          method: "GET",
          async: isAsync,
          headers: { "Accept": "application/json; odata=verbose" },
          success: function (data) {
              complete(data); // Returns JSON collection of the results
          },
          error: function (data) {
              failure(data);
          }
      });

  }

Here all columns are single line of text only

  • Maybe share your code and talk about which columns you are querying and whether they are indexed? I'm guessing folks may need a little more information to help your specific case. – thornomad May 8 '18 at 15:46
  • Please post code samples. Depending on the size of the list, indexes, and a number of other factors this could be expected behavior. – Taylor May 8 '18 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.