• amardesai89 (6/27/2013)


    I have one Stored procedure That takes around 2 hour to execute.

    it runs in 2 hours on server with 8 processors.

    and it runs in same time on server with 32 processors.

    is there any way we can make it utilize all the processors.

    or can we apply multi-threading so it can get executed faster.

    My car's broken - can you please fix it?

    Without any idea of the tables you are working with and the content of the stored procedure, it's impossible to say for sure. Read the link provided by Johan. At the very least, you could post the whole stored procedure and the batch of execution plans it generates.

    “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