Consider the following code, It is querying to a list called Employee Information which has about 23000 items, i.e it has crossed the list view threshold set by the administrator.
SPListItemCollection collBookings;
SPList emp_info =web.Lists.TryGetList("Employee Information");
emp_info.EnableThrottling = false;
SPQuery query = new SPQuery();
query.ViewFields = "<FieldRef Name='Title'/><FieldRef Name='Department' /><FieldRef Name='Author'/><FieldRef Name='Created'/>";
query.RowLimit = 1000;
do
{
query.QueryThrottleMode = SPQueryThrottleOption.Strict;
collBookings = emp_info.GetItems(query);//.GetDataTable();
int it_count = collBookings.Count;
query.ListItemCollectionPosition = collBookings.ListItemCollectionPosition;
} while (query.ListItemCollectionPosition != null);
Now in the above code i have used emp_info.EnableThrottling = false;
Now my question is what will this statement exactly do? Will it disable throttling for that list permanently or Will it disable throttling for this particular instance when this code is running?
And also what will happen if i use emp_info.EnableThrottling = true;
at the end of this code?