You are here: Home » Indexed list columns break filtered views

Indexed list columns break filtered views

Posted by cwogle
No Comments »

Uh oh. I'm going to need extra caffeine tomorrow morning.

I have a custom list that is, in essence, a database of the projects we do for our clients. It is just shy of 4,000 rows. My users rarely access it directly (most of them don't even know it exists), but a home-grown web part accesses the data several thousand times a day, filtering it in various ways and displaying data to said users. Six or eight months ago, I got tired of seeing the message "This list contains a large number of items. Learn about managing a large list or library and ensuring that items display quickly.", so I learned about indexed columns.

"Clever girl", I thought, and set about indexing the most often filtered columns. Much to my surprise, nothing ran any faster. That's when I found out here and other places that indexing doesn't really help much when run from CAML queries, just when you're using the SharePoint GUI to see your data. And as I said, almost nobody uses the GUI for this list.

Flash forward to today. I was creating a view on that list for the one user who actually does access the data directly, and the view required one of the indexed columns, just like several other existing views do. Design, implement, test, done — and it's back to zapping boss creeps. Or maybe not. The phone lit up as user after user complained that the web part now returned no data at all. What the? I tested the view. It worked. I swear. Ya gotta believe me. But now it returns nothing. So does every other view that uses an indexed column.

Astoundingly, I was able to find someone who actually has seen this problem before. Not so astoundingly, the poor guy never got a single answer to his post. I deleted the indexes (they didn't seem to be doing me any good anyway), and Shazam!, everything was back to normal.

Now I'll lie in bed tonight, staring at the ceiling and wondering how this happened. This has to stop. I need my sleep.

Your email is never shared.
Required fields are marked *




Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>