• sqlnaive (2/11/2014)


    I'm facing an issue here. I have one procedure which inserts data in a table with the help of some joins in few tables. Now there are around 1000 records to be inserted as a result of execution of that procedure. But the problem is that it's inserting one recor at a time. I have updated the statistics of all the dependent tables. There is no index on the table where data getting inserted. What can be the issue ? It's taking almost an hour to insert 1000 records.

    Please see the second link under "Helpful Links" in my signature line below. That's the information that we'd need to help you solve this problem.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)