The Database Engine Tuning Advisor has recommended the creation of some statistics for several of our queries. Turns out that some of these are the same just the column order is different in the CREATE STATISTICS command. For example:
CREATE STATISTICS [StatName1] ON [dbo].[table1]([column2], [column1])
CREATE STATISTICS [StatName2] ON [dbo].[table1]([column1], [column2])
are these the same or are they treated differently?
Along the same lines can I combine CREATE STATISTICS command for a given table? If the Advisor recommended 3 different stats on the same column for 3 different queries can I do a single create command for all 3 columns e.g.
CREATE STATISTICS [StatName1] ON [dbo].[table1]([column1], [column3])
CREATE STATISTICS [StatName2] ON [dbo].[table1]([column1], [column2])
into
CREATE STATISTICS [StatName1] ON [dbo].[table1]([column1], [column2], [column3])
Thanks
multiple stats on the same column are useless. Only one is needed.
order is irrelevant.