Thursday, June 23, 2016

To avoid Threshold for list in SharePoint 2013

Introduction

As all we know about Threshold in SharePoint. It is setting limit to view the list items. Threshold for normal user 5000 and 20000 for admins. If particular list exceeds this limit, then items will not be displayed in listview. We have 2 alternate options to resolve this. Let see one after one.

SPList.EnableThrottling

This option normally in true state for every list. If we disable this, List doesn't consider about threshold value. So List view will display items when list items exceeds threshold limit. Execute the below powershell script to disable this option. (But we have to consider about performace while running with huge amount data in list)

$web = Read-Host "Enter site URL : "
$spweb= Get-SPWeb $web
$listname = Read-Host "Enter List Name:"
$list = $spweb.Lists[$listname]
$list.EnableThrottling = $false
$list.update()
Write-Host "Throttling has been disabled..." -ForegroundColor Green

Daily time window for large queries

We are having this option in Request Trotting. We have a timer option in it. We have to set the time when and how long it will be visible. But we have to consider about performance, when we give long duration.