title: How to simulate a long-running query in SQL Server
body: <p>I am trying to simulate a long-running query in mssql to test out some kill commands and clean-up operations. The problem is, I cannot figure out a way to keep a query running for a long-time. Here is what I'm currently doing:</p>
  
  <pre><code>select * from sales1 cross join sales2 cross join sales3 ...
  </code></pre>
  
  <p>The query returns immediately though if I do <code>cursor.fetchall()</code> it takes forever to fetch the results.</p>
  
  <p>While that's returning, when I do:</p>
  
  <pre><code>cursor.execute("sp_who2 'active'")
  </code></pre>
  
  <p>It doesn't show that query (I suppose because it's already 'executed').</p>
  
  <p>Is there a way to emulate a long-running query with only one table of 100 results?</p>