I'm hoping someone might be able to offer some inspiration into a problem I'm seeing with a report. I'll start by giving some context:
We have a development server and a production server, both of which run SQL Server Reporting Services 2012 (SQL Server 11.0.2100).
I have created a report based upon a single stored procedure as part of a Visual Studio 2012 report project and deployed this to our development server. I tested that this was working and the coppied the report to the production server. The copy of the report on the production server takes much longer to run (2 minutes vs virtually instantly). So far I've tried the following:
- Run the stored procedure on each of the servers, these both take less than 1 second.
- Checked the ExecutionLogStorage table and it shows that the bulk of the time is spent in the Data Retrieval stage.
- Added some diagnostics to the stored procedure to see how quickly it's running when executed by reporting services, this again showed that the stored procedure is running in ~ 0.1 second. It seems to be run at the start of the 2 minute period where reporting services is displaying 'loading'
- Checked for resource locking on the databases and this shows that ReportServer.dbo.GetSessionData;1 is getting blocked by ReportServer.dbo.WriteLockSession;1. This continues for ~ 2 minutes the the lock is released and the report finishes generating.
It's worth noting that the stored procedure is not parameterised and therefore I don't think that this is due to the 'parameter sniffing' problem I've seen discussed elsewhere. The database names on both servers is the same. The default transaction isolation level for both servers is 'read committed'. The other reports on the production server run without any problems.
I'm quickly running out of ideas. Can anyone offer any advice?