1

I need to write something like this using blaze:

SELECT k2.field1
          , COUNT(1)
          FROM dbo.kp AS k1 WITH(INDEX(INDEX_kp_index1))
INNER JOIN dbo.kp AS k2 WITH(INDEX(INDEX_kp_index1)) ON k1.field2 = k2.field2
WHERE k1.field1 = '70675'
GROUP BY k2.field1

I need to specify the index, otherwise the query evaluates a very long time. Is there a way, how to do it? The table has multiple indexes.

P.K
  • 11
  • 2

0 Answers0