Troubles with CAML list query with lists >5.000 entries (threshold exceedance)
Hi, I have troubles with a CAML query of a list >5.000 entries (threshold exceedance). When making the following query (all queried list elements are indexed) there is the failure that the threshold is exceeded. I found out that the failure does only occure when using "any of the following conditions evaluate to true" instead of "all".
Does anybody have an idea what to do/change?
Thanks and best regards,
Christoph
-
Hi Christoph
Had the same effect when querying my large list (>5k items) with just a single "Any" group.
In my case it did help to add just an additional "Any" group comparison with the FileRef against a not valid dummy URL - don't ask me why exactly this filter is helping...
Reordering that the first filter comparison is returning not more than 5k items did help in most cases too + indexing the columns used in the filter (in some cases it's needed to not-index some columns - can't explain which specific cases...).
Hope this helps to solve your problem0 -
Hi Christof,
I have tried your idea. Unfortunately it doesn't work. It always returns zero items, i guess at there is no single item with FileRef = /sites/dummyURL.
0 -
Hi Christoph
For sure there is no item in the target list matching this imaginary FileRef value... it's just an additional filter part acting as workaround.
But now you're mentioning that you get back zero items and not facing the list view threshold error anymore, correct? Then the query to the list works without list view threshold issue and seems just your filter doesn't match with any items.0 -
It just works like this:
Then there is not threshold issue anymore but also no found item.
When I change the filter to this (according to your example), it doesn't work anymore (threshold issue back again):
0
Please sign in to leave a comment.
Comments
4 comments