Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 13 sec query, 58 sec report

Author  Topic 

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-08-04 : 02:45:48
I have a report based on an SP which calls a function. When I run the SP from a query tab in SMS it takes around 13 secs. When I run it from within the report with the same criteria, it takes ~58secs. Sofar I've only seen a few secs difference between the queries & the related report, but this is a huge difference.

On limited criteria- how I am running it, it returns 5893 rows, which granted is big, but I have had more rows where the difference isn't as significant. We have used the function for consistency between .NET online & RS & also across a number of reports which are based on the same criteria, so I would prefer not to create a new query for this.
I know we can also use snapshots & caching to speed up the report, but I am just wondering what may be causing this.
Has anyone struck this? Any ideas?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-04 : 13:49:03
are you using large sized images inside your report? does it contain lots of container?
Go to Top of Page

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-08-04 : 19:54:16
It just has 1 33kb image, 1 table & several text boxes. Yeserday evening when the other developers had gone home the report was also running for around 14secs. Now they are all here again it is back up to ~40secs. If this is not coincidence, I guess it may be something with the way RS is using the connection/Server when there are others using it. Web server & DB server are also on the same box which probably doesn't help.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-04 : 20:07:30
You can make that Report Cache if it is important.
Go to Top of Page

dexter.knudson
Constraint Violating Yak Guru

260 Posts

Posted - 2008-08-04 : 21:42:40
I found a join in the function which was unnecessarily linked to two different tables to get the key fields. Fixing this made the query around 10sec & the report around 15sec - much better. Interesting though how it affected the RS-served report much more than running the query only.
Go to Top of Page
   

- Advertisement -