Description
I don't want to get into the devops process as it is a process in itself that takes time, but what happens is I have a number of views with clustered indexes on them, then somebody alters one but forgets that there was an index, which now needs to be recreated. I will need to create such check for myself, so I thought I will put it out there to see if there would be any interest in it and how I could make it useful not only for myself.
Obviously there is no clear way to know if a view was supposed to have an index on it or not so I propose looking at the definition for a specific text. I would look for 'with schemabinding' as I use it only for indexes on which I want to build clustered indexes. But equally there could be a convention to add a comment in the definition /* INDEXED */
for example and any view with that in the definition would be expected to have at least a clustered index.
Activity