none
Stored procedure Taking long time RRS feed

  • Question

  • I have an Stored procedure in my database.

    When i am calling stored procedure, some time it takes 1 minute, some time it takes 2 minutes, some time it takes 4 minutes.

    so, in asp.net

    Command.commandType=120; 

    if i increase to 240 it will help..or any other performance issues...

    when i am calling stored procedure, if it takes more than 2 minutes...the stored procedure returning null value.

    cache.insert("tasks", dtTable,null, system.date.AddMinutes(30),TimeSpan.Zero);

    In above dtTable we are getting Stored procedure data.

    If dtTable Null value i am getting error, parameter value can' be null.

    How to fix this ....

    I need to execute the Stored procedure.

    Thursday, March 29, 2012 12:20 AM

Answers

  • You need to take a look at the query plan for the stored procedure and find out why it takes so long to execute.  Chances are you have bad indexes or a poorly designed query.


    Chuck Insight: The ability to see a thrilling adventure where others see only a near-death experience

    • Proposed as answer by Naomi NModerator Thursday, March 29, 2012 12:57 AM
    • Marked as answer by KJian_ Wednesday, April 4, 2012 2:39 AM
    Thursday, March 29, 2012 12:36 AM

All replies