![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#3
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#4
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#5
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#6
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#7
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#8
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#9
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
#10
| |||
| |||
|
|
I have used the DTA on this query... SELECT TI.Unit, TI.BusDate, TI.Product, TI.PLU, SUM(TI.RetailPrice) AS RetailPrice, SUM(TI.Quantity) AS Quantity, UTM.TillMap, MAX(TI.BusDate) AS LastSold, CC.CostCenterDesc, TI.LineIsVoid |
|
and it is recommending this index... CREATE NONCLUSTERED INDEX [_dta_index_TransactionItems_20_948198428__K4_K1_K3 _K2_K10_K31_K6_K34_5_13] ON [dbo].[TransactionItems] ( [BusDate] ASC, [Unit] ASC, [POS] ASC, [UniqueRef] ASC, [PLU] ASC, [FuelGrade] ASC, [Product] ASC, [LineIsVoid] ASC) INCLUDE ( [Quantity], [RetailPrice]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] What I don't understand is why column [FuelGrade] is part of the index as this column is not used in the query? |
![]() |
| Thread Tools | |
| Display Modes | |
| |