Interesting script. I ran it against one of my legacy databases to which I manage but did not design. It was quite clear the designer didn't understand the principals behind good database design and the concept of clustered primary key indexes. None the less the database that supports the application which in turns houses a very large volume of high profile data manages to do its thing regardless of how inefficient the back end is designed.
I have put almost 4 months in clean up, to a degree, making things a bit more tidy. Although I don't see as much stress on the database server and for me, I know things are much more quiet, at the end of the day the application marches forward and the end users really know no different.
Bad practices are hard to break. I have spent many hours coaching better design. For the most part it pays off. If I can keep resource intensive process down to a minimum I guess I've done my job.
Again thanks for posting this script. I found it quite useful.
Kurt W. Zimmerman
New York, NY