• mkarthikeyan.mohan (3/15/2013)


    Dear friends,

    i build the stored procedure was much more logic, each and every column having calculation.That was handled by function. each an every function also having loops.i was doing index also.it ll take the retrieving time more.

    kindly help me improve the performance.

    by

    karthick.

    Rewrite it without the loops and functions. If you post the code for the stored procedure and provide ddl and dml for the tables, then the folks here will be able to help you rewrite it.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden