Results 1 to 4 of 4

Thread: Statement Parameter Slow in Stored Procedure case

  1. #1
    Join Date
    Feb 2009
    Posts
    61

    Statement Parameter Slow in Stored Procedure case

    I have a report that use two parameters. Here when I run the MDX it takes 4.5 seconds to run. Then the same query when I put that in report with the parameter it is taking 21 seconds. What can be the reason for this. It is very incredibly slow. I am able to figure out the problem for the same. Any help really appreciated.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Statement Parameter Slow in Stored Procedure case

    Here the query in the code is taking 4.5 seconds. As far as I know that I use StrtoMember function in the Management studio it takes around more than 20 seconds in a loan statement. I think that problem is with the filter statement. You will need to call StrToMember many times that normally depends on the set.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Statement Parameter Slow in Stored Procedure case

    Try to used the SQL profile to get the plans for the different styles. Here the showplan all and showplan xml events lies under the performance group. You will need to check this out in the plans between the different version. Second thing you can do is try to rearrange the procedure arguments. It may be causing due to some strange boundary effect. If you have a local variable and assign the parameter value then use the variable. But on the other hand if you use the parameter directly then it will cause slow.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Statement Parameter Slow in Stored Procedure case

    It sometime work better if you can drop and create the new store procedure. If possible try to create a duplicate store procedure of the same with a different name and let the code same. I had tried this and it works more frequently. And if the new one is faster and then drop the old one. Other thing this one also depends on the traffic on the server at that particular time. Also if you can try execution plan in the query analyzer for both query and store procedure.

Similar Threads

  1. Use Of Stored Procedure in SQL Server
    By technika in forum Software Development
    Replies: 5
    Last Post: 30-01-2010, 11:24 AM
  2. What is sqlca Informix stored Procedure
    By Bosch in forum Software Development
    Replies: 3
    Last Post: 13-08-2009, 01:57 PM
  3. How to create, deploy and use DB2 stored procedure
    By garfield1 in forum Software Development
    Replies: 3
    Last Post: 08-08-2009, 11:10 AM
  4. How to call stored procedure using do while Loop
    By AK_Chopra in forum Software Development
    Replies: 3
    Last Post: 29-05-2009, 01:47 PM
  5. Passing parameter of Oracle procedure in PHP
    By Halina in forum Software Development
    Replies: 3
    Last Post: 22-04-2009, 08:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,982,003.34418 seconds with 16 queries