Long Running Report Dataset

  • I have a stored procedure that runs in under 30 seconds via sql management studio and about 10 minutes to run via the data tab of visual studio report designer. Does anyone have any ideas why?

    I use a bunch of temp tables, but I have other similar queries and they run fine.

    The query returns 17 rows.

    I can't figure out why it is taking so long to run from SSRS and so fast from SSMS.

    Suggestions?

    Thanks, -M

  • Sounds like a case of parameter sniffing. You can look it up in Google and find lots of information about this type of issue.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • OMG, Jeffrey, Thank you sooooo much!

    I googled all day yesterday and didn't run into it.

    I ended up adding a local variable to the sproc and setting the local variable to the passed in parameter - which made the report render in about 20 seconds instead of 10 minutes.

    Thank you for your help. I love this forum!

    -M

  • Glad I could help - your solution is one of the recommended approaches for solving this type of problem.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply