SQL Server Reporting Services 2005 (Performance)
Posted on 2011-02-25
Please let me know your thoughts about a slowness I am experiencing:
I have a c#.net application using .net sql connection to a sql server 2005 database. Every 7 seconds the application updates (via query) to display data to the screen from the database. (The database is relatively small (<400mb - recordsets max ~ 60k)
Recently we added a report to sql server 2005 reporting services that calculates information from the same database. The report is a dashboard that shows about 7 calculated figures. There are 5 datasets to this report (3 of the datasets grab data from multiple joined views).
When we ran the RS report we would notice that the c# application would halt and not return data every 7 seconds. We would have to wait for the report to finish which took ~ 30 minutes.
Figuring it was the joining of views and multiple datasets behaving so slow we ran the same report directly against the database through enterprise manager and the results were drastically different. We got information back almost instantly without affects other applications attached to the database.
Next, we made a testdatabase to sit along side the original database; we found out its not a hardware resource issue on the server since we could run the RS report against the testdatabase and not interrupt the original database or c# applicatoin attaching to it. RS still took way too long to compile and display the report.
We figured it could be the joining of views and indexed the views; this did help the RS report to run ~ 20% faster - but still takes a lot more time to compile in RS compared to running the queries directly in enterprise.
There are many reports that have been running on the same report server for a few years along side the c# applicatoin that shows new data every 7 seconds without interrupts. These reports are also crunching some pretty complex reports - but very quickly (a few seconds). The big difference with the new report is it having 5 datasets and inside 3 of those datasets it is running queries that join multiple views. (Please note: I read online that joining views can degrade performance in sql server - but in this case it appears that it is a little bit more than should be expected since the joining of views in a direct query to the database through enterprise pulls back data relatively quickly).
I am starting to think it is RS and its ability to handle the complex structure of the dashboard?
*We also ran the dashboard through access against the original database (same database c# app connects to) and it compiled the report in seconds. (Did NOT affect the c# application at all during those few seconds)
Please let me know your thoughts.