So this is the story, I started to modify the code you had posted. But then I decided that it was too much of a mockup of you real-world case. Particularly, I felt an uncertainty about the data distribution in a real-world situation. This is by no means unimportant when deciding on index strategies.
Also, I found the lack of NULL/NOT NULL constraints to be disturbing.
Thus, I decided that I would only post some general pieces of advice that you could work from.
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
No comments:
Post a Comment