Your company network includes a SharePoint Server 2010 Service Pack 1 (SP1) server. You create an http:// www.contoso.com web application that has multiple site collections. The site collections have a large amount of content residing across lists. You deploy custom web parts that query the list items through the SharePoint object model. You need to ensure that the custom code that queries the list items and default list views remains within 2,500 items for each request.
What should you do?
A. Limit List View(s) to display only 2,500 items for each list that includes more than 2,500 items.
B. Set the value of the PropertySize attribute to 2500 on the WebPartLimits node in the web.config file.
C. From the SharePoint Server 2010 Service Pack (SP1) Management Shell, run the following commands:
$site = get-spsite http://www.contoso.com
$site.WebApplication.MaxItemsPerThrottledOperation = 2500 $site.WebApplication.AllowOMCodeOverrideThrottleSettings = $false
$site.Dispose( )
D. Set the value of HTTP Request Monitoring and Throttling to No. Set the value of Daily Time Windows for Large Queries to 0 hours.
E. From the SharePoint Server 2010 Service Pack (SP1) Management Shell, run the following commands:
$site = get-spsite http://www.contoso.com
$site.WebApplication.MaxItemsPerThrottledOperation = 2500 $site.WebApplication.AllowOMCodeOverrideThrottleSettings = $true
$site.Dispose( )
Correct Answer: C
Explanation/Reference:
In SharePoint 2007 the max items that can be returned by a list view was approximately 2000 items and any query over this limit shall result in low performance and increased load on the server. But SharePoint P2010 list now capable of handling very large data. But most of the time we don’t want to return all of these data in a single query. To aid with this, SP2010 introduces list throttling settings that allow us to specify how many items a user can query before the throttle kicks in and aborts the query. This applies to both the queries that retrieve through SharePoint UI or from custom code. List throttling will enabled to display an error message List throttling in SharePoint 2010 has been designed to give IT administrators a tool to manage and police their servers. Using list throttling, you can configure and control the number of items fetched as a result of a query. There are warning levels, different levels for administrators, and the ability to configure time windows for expensive queries or the ability to request throttle overrides in the object model. Also, the administrators can choose to block all possible throttle overrides on a per-web application limit.
By default throttling limit is as mentioned below:-
1. MaxItemsPerThrottledOperation
MaxItemsPerThrottledOperation tells you that if the list contains 5,000 to 20,000 items , and if the administrator queries the list, the administrator will be given all the lists items requested. However the administrator will be shown a warning on the list settings page, telling the administrator that even though his query was successful, nonadministrative users will not be able to query more than 5,000 items.
2. MaxItemsPerThrottledOperationWarningLevel: 3000
If list has more than 3000 item then list is throttled and it will give a warning message. How to increase throttling limit
However if business wish to run expensive query then You can do so in code by using the SPQuery.RequestThrottleOverride and
SPSiteDataQuery.RequestThrottleOverride methods.
Also, the IT administrator can globally disable all such override requests at the WebApplication level by using the WebApplication.AllowOMCodeOverrideThrottleSettings property.
http://sharepoint.infoyen.com/2012/03/14/lists-throttling-in-sharepoint-2010/