title: Slow performance of Reporting Services, very fast in QueryAnalyser
body: <p>We're using SQL Server 2005 with Reporting Services.</p>
  
  <p>We have a number of reports, each containing a relatively simple SQL query - by "relatively" I mean that we do have a few joins, but nothing worse than that. We do not call any stored procedures in our queries - this is not a case of parameter sniffing.</p>
  
  <p>When executing one of these reports (let's call it report A) through Reporting Services, it takes an extremely long time to complete - on the order of tens of minutes or even hours. When executing the corresponding SQL query in Query Analyzer, it completes in a few seconds.</p>
  
  <p>The number of rows returned from the database can be as few as 1 - yet, the report never completes.</p>
  
  <p>The other reports are working fine.</p>
  
  <p>Looking in the ExecutionLog table on the Reporting Services, I can see that most of the time is in TimeDataRetrieval (and we're talking millions of seconds here...) - those times the report actually completes. If the report is manually aborted, TimeDataRetrieveal is zero and TimeProcessing is absurdly high instead.</p>
  
  <p>I've looked into the logs of Reporting Services, but everything looks normal. </p>
  
  <p>Now, before you start suggesting "lock" - well, our queries do have the nolock hint turned on.</p>
  
  <p>As it stands, I've reached the limit of my imagination trying to find the error. Any thoughts, insights would be gladly appreciated.</p>
  
  <p>/Christoffer</p>