0

I have table with structure

  • LocId varchar
  • ParameterId varchar
  • Mdate datetime
  • pvalue double

With primary key on first three columns and clustered Index on same column.

  1. I found when in where clause there is LocId,parameterId,mdate in query excecution plan it shows seek
  2. I found when in where clause there is LocId in query excecution plan it shows seek
  3. But where in where clause there is ParameterId in query excecution plan it shows scan.
user641812
  • 335
  • 5
  • 19
  • 3
    `shows seed` or shows index scan? – andrews Dec 26 '17 at 17:39
  • 1
    @DavidBrowne-Microsoft is correct. If you frequently query with ParameterId alone, you may wish to consider creating an index on ParameterId. However, keep in mind that more indexes means more time to write data for every row, so if the table is infrequently queried this way but frequently modified, it may not be worthwhile. – Bacon Bits Dec 26 '17 at 18:00
  • @andrews Sorry it is index scan – user641812 Dec 27 '17 at 06:12

0 Answers0