• rameelster (11/22/2015)


    In a test database server ,database changed to single user mode while creating non clustered index on primary key taking long time to complete. the table is a large one.

    Define "large one" and type and number of column(s) your PK consists of. Then, tell us what a "long time" is.

    The reason why I'm asking all these "silly" questions is because if you have a 1 million row table and it's taking 14 hours (as an example), then you have some other serious considerations to discover.

    --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)