I have a table with a high pace (~ 160 million rows) #itemsTemp
itemId | style | styleWeight -------------------------------- int | smallint | float(53)
and the following query:
select itemId, style, SUM(styleWeight) itemCount from
#itemsTemp currently has no indexes. I am a bit confused about what would be best here:
- A composite index on
itemId and style (and probably include styleWeight) - Separate indexes on
itemId and style
Which direction should I go? What for? Any other options?
source share