title: Query runs slower from live server than on local machine
body: <p>I have a query which is called from an ASP.Net application. When running from my local machine it runs in about 0.1s. When I publish the application to the live server the same query takes > 40s.</p>
  
  <p>Both code bases are EXACTLY the same and are targeting the exact same server. I have checked for any firewall issues and both my machine and the live server are on the same domain as the database server.</p>
  
  <p>What could I have missed, what could possibly be slowing this query down so much?</p>
  
  <p>EDIT: Illustration of current structure.</p>
  
  <p><img src="https://i.stack.imgur.com/Y8TRY.jpg" alt="enter image description here"></p>