How do I test the performance of an SQL query with parameters in SSMS?

48 Views Asked by At

Using ActivityMonitor, I got an SQL query that is slow.

It looks like this:

SELECT 1, 2, 3, 
FROM MyTable 
WHERE Column1 = @parameter1 AND Column2 = @parameter2

How do I execute the query with specific parameter values without changing the existing execution plan?

1

There are 1 best solutions below

0
TT. On

I would guess a combination of the following query hints would do that:

  1. KEEPFIXED PLAN
  2. Any of