Querying list using a "where Modified" triggering List View Threshold, even though it is indexed?

Iron Contributor



I am trying to retrieve records modified since a given date from a list that has 20k+ items in it. I have created an index on the "Modified" column, and then tried (using PnP Powershell) to retrieve the items:


$items = Get-PnPListItem -List "Shop Opening Records" -PageSize 5000 -Query "<View
Scope='RecursiveAll'><RowLimit>5000</RowLimit><Query><Where><Geq><FieldRef Name='Modified' /><Value Type='DateTime'>2018-07-10T03:30:05Z</Value></Geq></Where></Query></View>"


However this is resulting in a LVT error. Any ideas why? I thought indexing "Modified" would avoid this as it is the only field used in the query?



0 Replies