7

Today I have encountered the 5000 limit error even though my view is filtered on an indexed column. I believed that because the filtered view was on an indexed column then the result could return more than 5000 items?

So even if columns are indexed and used in a filtered view then it can only return a maximum of 5000 items?

This also affected other views that use the indexed column to filter and do not return anywhere near 5000 items. These views do sort on columns that are not indexed, would this have an impact?

3 Answers 3

4

At any point the filter should always return less than 5000 (resource limit) items.

Filtering as well as Sorting should be on Indexed Columns.

1
  • Filtering, sorting and also grouping the same list can trigger the LVT exceptions. As soon as the 5001st record is loaded from SQL it will trigger the exception. This is loaded from SQL and not displayed to the user Mar 26, 2018 at 22:13
2

You will always encounter 5,000 Item limit, does not matter whether you indexed the columns or not. The difference though is that if you never indexed columns, your list will stop displaying entries once limit is exceeded.

However, if indexed columns and are filtering on those indexed columns, you will have an ability to display the list rows. As the previous responder stated, the secret here is to limit the # of entries per view. You will never be able to display more than 5000 entries per view and there should be no reason for this. Try to limit to 5o or 100-200 per view. That should be more than enough for a user to get to info they need with proper views/filtering, etc. Just like Google Search results, nobody every checks out Pages 5 or 6 of results. I have written a detailed post on the topic, you can check it here

4
  • Thank you for your articles, videos and podcasts. Does the default pagination of 30 items in lists and libraries in modern experience mean that LVT will NEVER be exceeded when loading a view or applying a column filter/sort/group because only 30 items are being requested at a time? If not, why not? My specific question about this is here. Aug 16, 2022 at 12:47
  • 1
    Thanks for the feedback and kind comments. From my recent experience, when it comes to displaying items in a list or library, 5000 LVT issues does not really exist anymore. With modern lists and libraries, it loads items as you scroll through the list, so 30 items per pagination does not really apply anymore. Aug 18, 2022 at 2:13
  • Thankyou very much - would that conclusion also apply to these scenarios (which I think are an exhaustive list of all actions that could cause LVT error): 1) Selecting a View with Filtering defined 2) Selecting a View with Sorting defined 3) Selecting a View with Grouping defined 4) A user Filters on a column (whether via Filters panel or column title) 5) A user Sorts on a column 6) A user Groups on a column 7) Searching 8) When destination list of Lookup column is more than 5,000 items i.e - in all these scenarios, 5000 LVT issue doesn't really exist because of 'lazy load' functionality? Aug 20, 2022 at 7:31
  • I have just run into list view threshold error on a document library which has 8,200 items in it. It occurred when I modified a View to Sort on a date column in descending order. So it seems the LVT does still exist in Modern environment in SharePoint online :( Edit: interestingly, this happened when sorting on a date column that was pulled in as an additional column from a Lookup column. As an alternative, I tried sorting on another date column and there was no LVT error. Aug 31, 2022 at 11:44
0

You're correct, you can't sort a list with more than 5000 items on a non-indexed column, your views that use that sort will not work. You can try indexing those columns and that should fix your views.

However, I've seen multiple cases where those internal indexes went out of sync with the list data when lists had more than 5000 items and items were constantly deleted and added. In those cases the views stopped working even though all indexed fields were configured correctly. Microsoft support acknowledged the problem but said they couldn’t help when the issue involved actual data and had nothing to do with the list schema. As a workaround, we had to recreate the indexed fields and copy values over and the views would start working again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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