SQL Server Performance

How to tunning my Sql Code.

Discussion in 'General Developer Questions' started by Sandy, Mar 2, 2009.

  1. Sandy New Member

    Hi All,
    I wants to know how to excute my query faster.
    I have a code of line 1000 lines.
    I wants to tune it..can you please tell me what are the area need to check to make more faster my excution.
    Thanks,
    Sandy.
  2. FrankKalis Moderator

    In your case I would start by looking at the execution plan to find out where most of the time is spent and take it from there.
  3. Sandy New Member

    Frank,
    Can you please tell me what are the common area I can check before going to execution plan..
    Thanks,
    Sandy.
  4. FrankKalis Moderator

    This is a broad question and it might be better to have a look at the Articles section here on the site on how to generally approach performance related questions to get an idea, because all I could say would just repeat what you could read there. [:)]

  5. Sandy New Member

    Thanks Frank.
  6. satya Moderator

    Offhand I would like to ask you why you think tuning of a query is required?
    DO you see any performance loss while executing this code?
    Or any upgrade of SQL version performed?
  7. Sandy New Member

    Hi Satya,
    In my development server its taking only 10 sec to execute the whole script but in my production server its taking more than a Minute to execute the same code.
    Can you please tell me the reason?
    Thanks,
    Sandy.
  8. moh_hassan20 New Member

    can you run set statistics io ON , set statistics time on, in both development and production server and post the results
    i guess we can find magic numbers to help fixing the problem [:)]
  9. FrankKalis Moderator

    [quote user="Sandy"]
    In my development server its taking only 10 sec to execute the whole script but in my production server its taking more than a Minute to execute the same code.
    Can you please tell me the reason?
    [/quote]
    Can you please post the code?
  10. FrankKalis Moderator

    Well, preferrably not all 1,000 lines... [:)]

Share This Page