SharePoint Threshold Limits
I've been testing, using, planning stuff around SharePoint limitations, or default limitations so to say.
I think it is about time I make a post on this.
There are four types of threshold limits:
- List View Threshold
- List View Threshold for auditors and administrators
- List View Lookup Threshold
- List Unique Permissions Threshold
List View Threshold
By default, lists and libraries are set up to work properly with less than 5.000 items.
This means that if items exceed this value, at the very list, there will be performance issues.
List View Threshold for auditors and administrators
Usually admins are entitled to 20.000 items instead of 5.000.
This means that an admin can easily overlook threshold issues because everything will continue working for him.
List View Lookup Threshold
By default your Content Types and Columns should only contain up to 8 lookup fields on each library.
List Unique Permissions Threshold
When you instantiate permissions on a list you are able to view and edit unique permissions.
These also have a limitation that by default is set to 50.000.
So now that this is clear let's try to enumerate what happens when these values are exceeded:
- If you use the harmon.ie plugin (great app by the way), it will automatically stop showing any items whatsoever on that library
- Default List views will continue working.
However, regular users will see a "only a part of existing items is being shown" message.
Admins will see everything as usual.
- Custom solutions may break if they are retrieving "all items" from a server location
Now let's mention what can be done to avoid this:
- Plan. If you foresee that many documents will be uploaded to the same location, try distributing on more libraries, sites or site collections
- Records Management. Move outdated items over to another place.
- Defensive Programming. E.g. "Specify a SPQuery.RowLimit between 1 and 2000"
- Set EnableThrottling to false on the list. This will ignore the threshold limits completely. (not a very nice practice)
- Use ContentIterator
- Increase the Threshold value(s).
Once these values are changed, they are instantaneously updated on the existing sites and lists of the Web Application, no recycles required.
- Use techniques to handle large lists
* Additionally we can go to Storage Metrics (/_layouts/storman.aspx) and check how everything is going.
Resources:
SharePoint lists V: Techniques for managing large lists,
http://office.microsoft.com/en-001/sharepoint-server-help/overview-RZ101874361.aspx?section=1
Best Practices: Common Coding Issues When Using the SharePoint Object Model,
http://msdn.microsoft.com/en-us/library/office/bb687949%28v=office.12%29.aspx
Designing large lists and maximizing list performance (SharePoint Server 2010),
http://technet.microsoft.com/en-us/library/cc262813%28v=office.14%29.aspx
SharePoint 2010 - Coding standards and best practices,
http://sptechbytes.blogspot.se/2013/03/sharepoint-2010-coding-standards-and.html
"SharePoint 2013 App - Manage List Threshold (Moving Multiple Documents in Folders) Office365/ On-premise", Andre Lage,
http://aaclage.blogspot.se/2014/02/sharepoint-2013-app-manage-list.html
Peter Kalmström, "Archive SharePoint Library Documents",
http://blog.kalmstrom.com/2014/06/archive-sharepoint-library-documents.html
I think it is about time I make a post on this.
There are four types of threshold limits:
- List View Threshold
- List View Threshold for auditors and administrators
- List View Lookup Threshold
- List Unique Permissions Threshold
List View Threshold
By default, lists and libraries are set up to work properly with less than 5.000 items.
This means that if items exceed this value, at the very list, there will be performance issues.
List View Threshold for auditors and administrators
Usually admins are entitled to 20.000 items instead of 5.000.
This means that an admin can easily overlook threshold issues because everything will continue working for him.
List View Lookup Threshold
By default your Content Types and Columns should only contain up to 8 lookup fields on each library.
List Unique Permissions Threshold
When you instantiate permissions on a list you are able to view and edit unique permissions.
These also have a limitation that by default is set to 50.000.
So now that this is clear let's try to enumerate what happens when these values are exceeded:
- If you use the harmon.ie plugin (great app by the way), it will automatically stop showing any items whatsoever on that library
- Default List views will continue working.
However, regular users will see a "only a part of existing items is being shown" message.
Admins will see everything as usual.
- Custom solutions may break if they are retrieving "all items" from a server location
Now let's mention what can be done to avoid this:
- Plan. If you foresee that many documents will be uploaded to the same location, try distributing on more libraries, sites or site collections
- Records Management. Move outdated items over to another place.
- Defensive Programming. E.g. "Specify a SPQuery.RowLimit between 1 and 2000"
- Set EnableThrottling to false on the list. This will ignore the threshold limits completely. (not a very nice practice)
- Use ContentIterator
- Increase the Threshold value(s).
Once these values are changed, they are instantaneously updated on the existing sites and lists of the Web Application, no recycles required.
- Use techniques to handle large lists
- Index columns
- Create folders
If we open the Library settings it will tell us how many items we have in case it is exceeding the limit*
* Additionally we can go to Storage Metrics (/_layouts/storman.aspx) and check how everything is going.
Resources:
SharePoint lists V: Techniques for managing large lists,
http://office.microsoft.com/en-001/sharepoint-server-help/overview-RZ101874361.aspx?section=1
Best Practices: Common Coding Issues When Using the SharePoint Object Model,
http://msdn.microsoft.com/en-us/library/office/bb687949%28v=office.12%29.aspx
Designing large lists and maximizing list performance (SharePoint Server 2010),
http://technet.microsoft.com/en-us/library/cc262813%28v=office.14%29.aspx
SharePoint 2010 - Coding standards and best practices,
http://sptechbytes.blogspot.se/2013/03/sharepoint-2010-coding-standards-and.html
"SharePoint 2013 App - Manage List Threshold (Moving Multiple Documents in Folders) Office365/ On-premise", Andre Lage,
http://aaclage.blogspot.se/2014/02/sharepoint-2013-app-manage-list.html
Peter Kalmström, "Archive SharePoint Library Documents",
http://blog.kalmstrom.com/2014/06/archive-sharepoint-library-documents.html
Good article, this last days a lot of people pick up this topic....
ReplyDelete