I have a SharePoint lists with 10 000 items, and someone else has increased the limit to 250 000 (Crazy right?).

What I have done is I've indexed the Changed By Date, and made views that is sorting by that column.

What I want to know is, when I use CQWP to view the list, it will only view 250 items on 1 page, order by that column. What is going on behind the scene? Does it only query for the newest 250 items, or does it actually get a resultset of 10 000 and order it ?

And question 2. Will something break if I change that limit to 5000, when there is no single query that should return more than 5000 hits?

1 Answer
1

A SharePoint view with filter/sorting will use what it considers to be the best index on the SharePoint list, so it'll make SQL server order the result and only return 250 items.

If you don't have any queries (Views/Code) where SharePoint can't ask SQL server to limit the result then you'll have no problem changing the limit back to 5000.

But if there's any views/code which request items and only filter/sort by columns which has no index or where the index can't limit the content to below 5000 then you'll get the errors again when these are used.

But you're right the proper solution is to leave the 5000 limit in place if possible.