Thanks for great sql that reveals more about SQL Server, but I have a question.
The Util_MissingIndexes stored procedure returns multiple rows that appear to be saying that I need three new indexes on the same table (Enc), but each new index is a subset of the first recommendation.
For instance, the sp returned the following three rows (shortened for this message)
1 dbo 291297339 Enc U 7530068 3412.063 [PtObjId], [EnableFinPrcsInd] [ObjId] [StsCd], [StrDate], [StrTime], [TypeCd], [StpDate] 2 7023 0 2.87829945469006 98.76 0 0 0 0 19969.321849
1 dbo 291297339 Enc U 7530068 3412.063 [PtObjId], [EnableFinPrcsInd] [ObjId] [StsCd], [StrDate], [TypeCd], [StpDate] 2 5230 0 2.87394199866952 98.79 0 0 0 0 14854.523323
1 dbo 291297339 Enc U 7530068 3412.063 [PtObjId], [EnableFinPrcsInd] [ObjId] [StrDate], [StrTime], [TypeCd] 2 4613 0 2.87726844978175 98.82 0 0 0 0 13121.904437
So my question is, if the first row says I should index the following columns in the Enc table - [StsCd], [StrDate], [StrTime], [TypeCd], [StpDate], should I create indexes for the second and third rows that would also index the exact same columns, or will SQL Server be able to find them in the first index.
Thanks
James