Here's the situation:
- I have a heavily customized web application built on top of MOSS 2007
- We're in the process of upgrading the application to SharePoint 2010
- QA has identified that a page which used to work fine in SP2007 now throws a SPQueryThrottleException, as it queries a large list.
- The list in question contains 52,000 items
At first sight, I thought "There are too much items being returned", so I've tried tweaking the query by setting the RowLimit and paging the results. This was to no avail: SharePoint still threw the SPQueryThrottleException.
I've looked at the query and added the fields in the
<Where /> clause to the indexed fields. According to various pages this should solve my problem, but it didn't. SharePoint still throws the exception.
I've tried using the
ContentIterator to process the list, passing in an
SPList and an
SPQuery, including several options. Alas, I still get the SPQueryThrottleException.
I'm running out of options here. The AM Team has raised the throttling limit to 100,000 rows, but I don't like this solution as it's not future proof. Further raising the limit is an option (the farm is dedicated to this web application) but undesired. An alternative is setting
false, to me this feels like a hack.
The columns being queried are:
- A lookup column to a different list
- The "Created by" (Author) column
Can anyone provide me with some pointers on how I can get this issue resolved?