Fixing a slow running SQL query
<p>I have been asked this in many interviews:</p>

<blockquote>
  <p>What is the first step to do if somebody complains that a query is running slowly?</p>
</blockquote>

<p>I say that I run <code>sp_who2 &lt;active&gt;</code> and check the queries running to see which one is taking the most resources and if there is any locking, blocking or deadlocks going on.</p>

<p>Can somebody please provide me their feedback on this? Is this the best answer or is there a better approach?</p>

<p>Thanks!</p>