Monday 6 July 2015

Programmatically Diasable List Throttling for a specific List in SharePoint - Powershell

Hi All,

 Today we will see about "How to Diasable List Throttling for a specific List".

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 and from custom code. Default limit is 5000 items per list. While exceeding this limit results in display of an error message. We can override it by calling RequestThrottleOverride on the SPQuery object. This will allow us to execute large unsafe queries.

SharePoint 2010 provides Administrators to control a limit of how many items to be retrieved from the lists at a time using User Interface or Object Model.

SharePoint by default set some limitation to your web application to make sure that performance is good even when data increasing. These limitations has been tested and carefully chosen by SharePoint Team and Microsoft does not recommend changing these value.


List Throttiling feature is webapplication level.
If we want to change the limits for the whole web app,
From Central Administration
1. Go to SharePoint 2010 Central Administration
2. Under Application Management, click "Manage Web Application"
3. Choose the web application that you want to change. On the ribbon click "General Settings" and then "Resource Throttling"
4. Change throttling settings and click OK.

To override the default throttling settings. just execute the below powershell to add list items more than the threshold limits.

web = Get-SPWeb -Identity http://mysite
$web.AllowUnsafeUpdates = $True
$list = $web.Lists["ListName"]
$list.EnableThrottling = $False
$list.Update()
$web.AllowUnsafeUpdates = $False
$web.Update()
$web.Dispose()

Thanks for your time.. Happy SharePointing..

No comments:

Post a Comment