If your requirements involve querying for more than 1,000 lists, you can increase the list limit if the database load that the operations require is acceptable. You can do this by adding a MaxListLimit attribute to the ListsOverride property of the Web Part. For example, if you wanted to raise the list limit to 2000, you would set the ListsOverride property as:
<Lists ServerTemplate="850" MaxListLimit="2000">
We are actually doing this through the object model but the issue is the same.
What if we want to query over 2000 lists. We actually need to query all webs under out site collection. We have like 3000 sub webs at the moment and almost all of them have a custom list that we need to run a query against. The query is supposed to get something like users latest documents or users latest tasks.
The site structure is as follows root web -> base web – project webs(about 800) -> subproject webs(3-4 / project web)
We tried to correct the issue by running the query on each project web, but that seems to be too slow.
If we set the MaxListLimit to 0 and run the query, we will get the following SQL Errror:
The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect.
Too many parameters were provided in this RPC request. The maximum is 2100. </clip>