Question

I am unsuccessfully attempting to cause an SPQueryThrottledException locally in order to debug a problem a customer is having.

I'm using SPSiteDataQuery to query several sites which contain 4000 to 8000 items each, totalling over 43000. The query is being run against an elevated instance of the root SPWeb of the site collection.

The query is filtered using both the <Webs> and <Lists> elements, but not by any other attribute, and is not querying recursively. It runs at the Site Collection scope.

The query has run successfully when triggered by user accounts of Contribute level permissions and higher (although this is redundant given the elevation). Lower permission levels would fail for other reasons.

The twist is this: When running locally the query succeeds, but when running in the customer's live instance, the query fails when more than 5000 items are queried in total.

We both have the same Throttling settings:

  • 5000 normal limit
  • 20000 admin/audit limit
  • Out of hours query limit removal is disabled
  • 8 field lookup limit (which we're nowhere near)

So why is the querying running successfully here, with item requests far beyond even the admin limit?

Was it helpful?

Solution 2

A colleague of mine did a bit of research as it piqued their curiosity. It seems the cause of the difference is the user account the process is escalated to.

Our customer has followed Microsoft's recommendations and set up an account that does not have administrator permissions. Whereas I was running on a development box with no such restrictions.

OTHER TIPS

Are the fields in the lists on your local environment indexed? If they are indexed, then throttling will not occur.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top