0
votes

Azure SQL Server has a simple table with three columns, all of which are part of the Clustered Index. The select query that filters using two of those columns and returns the third column uses Index Scan instead of Index Seek. A total of 500k records are being scanned and the CPU usage is high and the execution is slow

enter image description here

Clustered Index

enter image description here

Are there any reasons to not use Index Seek? Should I create the non-clustered index as suggested?

It's not seeking due to order of columns in the index : you filter by non-leading columns.... that's why there is an index suggested.Mitch Wheat
Should I move the UPC column to be bottom of the Index? Or would you suggest to create the non-clustered index? What is the best solution that would be impact both the Select & Insert operationsMugil Karthikeyan
I don't know your entire query workload, so I can't say what will be the best design.Mitch Wheat
This table get loaded once in a day and being read multiple times in a day. It has about 500k records.Mugil Karthikeyan