A couple of weeks ago, I received a call from a customer telling me his users were hitting the listview threshold eventhough he was sure there weren’t more than about 3000 listitems in the specific list they were using.
Now, after several years of working with SharePoint, you somehow develop a sort of sixth sense of understanding what the problem might be. I’m sure all you SharePoint developers recognize this 🙂
So I asked the application owner if he could check the recycle bin (both of them!) and empty if needed. Fortunately, that did the trick.
After some Googling, I found out that this behaviour is known for SharePoint. Items in the recycle bin are not really deleted. If you are using an indexed field, the deleted items in the recycle bin will still be taken into the total count. So, if there are a couple of thousand deleted listitems in the recycle bin and only a few in the list itself, you might still hit the listview threshold.