• ScottPletcher (3/25/2015)


    I don't see a clustered index on the table (but maybe I just missed it).

    There isn't one. I don't know why they don't have one, except that they really don't have a single unique column on which to put it and I'm not sure a composite would work because it would require lots of columns for uniqueness. On the other hand, I should discuss surrogate keys with them and see if an IDENTITY would work.

    GilaMonster (3/24/2015)


    Order of columns within a query is irrelevant. What in my comment suggested otherwise?

    Nothing specific. Your comment triggered a memory of a SQL Saturday event on indexes I attended and some imperfect memory of the speaker mentioning that an index wouldn't work properly if the index columns were in a different order than something in the query. I think he referenced the WHERE clause, but again, imperfect memory and I figured that it only took 2 seconds for me to alter the SELECT and see if it applied there as well.

    Which it didn't. But hey, at least I tried it to see if it was something I had missed.

    I will communicate with the report team to see if they have a problem changing up their index. They probably won't, but they will if I don't ask first. Thank you for the suggestions.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.