Skip to main content
added 2 characters in body; edited title
Source Link
marc_s
  • 9k
  • 6
  • 45
  • 52

Can I rely on the order of columscolumns on an index generated by Databasedatabase tuning advisor

I got the following recommendation on a table:

CREATE NONCLUSTERED INDEX 
    [_dta_index_MyTable_6_44943632__K16_K52_K8_K9_K15_1_2_4_5_6_7_10_11_12_13_14_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_] 
ON [dbo].[MyTable] 
(
    [ColumnA] ASC,
    [ColumnB] ASC,
    [ColumnC] ASC
)

However, I am a bit surprised about the order of the fieldscolumns in the recommendation. I would expect the result to be ColumnB, ColumnA, ColumnC.

Can I rely on the recommendation or should I decide the order of the fieldscolumns?

Can I rely on the order of colums on an index generated by Database tuning advisor

I got the following recommendation on a table:

CREATE NONCLUSTERED INDEX 
    [_dta_index_MyTable_6_44943632__K16_K52_K8_K9_K15_1_2_4_5_6_7_10_11_12_13_14_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_] 
ON [dbo].[MyTable] 
(
    [ColumnA] ASC,
    [ColumnB] ASC,
    [ColumnC] ASC
)

However, I am a bit surprised about the order of the fields in the recommendation. I would expect the result to be ColumnB, ColumnA, ColumnC.

Can I rely on the recommendation or should I decide the order of the fields?

Can I rely on the order of columns on an index generated by database tuning advisor

I got the following recommendation on a table:

CREATE NONCLUSTERED INDEX 
    [_dta_index_MyTable_6_44943632__K16_K52_K8_K9_K15_1_2_4_5_6_7_10_11_12_13_14_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_] 
ON [dbo].[MyTable] 
(
    [ColumnA] ASC,
    [ColumnB] ASC,
    [ColumnC] ASC
)

However, I am a bit surprised about the order of the columns in the recommendation. I would expect the result to be ColumnB, ColumnA, ColumnC.

Can I rely on the recommendation or should I decide the order of the columns?

edited tags
Link
Colin 't Hart
  • 9.4k
  • 15
  • 36
  • 44
edited tags
Link
Colin 't Hart
  • 9.4k
  • 15
  • 36
  • 44
added 42 characters in body
Source Link
ypercubeᵀᴹ
  • 98.7k
  • 13
  • 215
  • 305
Loading
Source Link
Loading