Automating T-SQL Code Analysis

Redgate Software
With all the options available within T-SQL these days, it's more and more imperative that our code be clear and consistent. For example, there are clustered indexes and nonclustered indexes. Oh, but those are rowstore indexes. You also have clustered columnstore and nonclustered columnstore indexes. When you write T-SQL that says "CREATE INDEX MakeMyQueriesFast ON dbo.MySlowTable" which one do you mean? Well, the default there will be a nonclustered rowstore index. How do I know that? I checked the documentation. Oh, same thing will work with a columnstore index. You don't have to specify that it's nonclustered, but doesn't that seem unclear to you? It does to me. Clarity and Understanding You can write T-SQL a bunch of ways. Further, you can do some pretty crazy stuff with it that…
Read More