• cfradenburg (3/26/2010)


    . . . One thing that I don't have time to right now but would be interesting to is seeing as this is all happening in one insert whether or not SQL will order the rows in the order it needs to write them if no sort order is applied.

    I believe that what will happen is that the data being imported will tend to be in the "order of entry" rather than SQL Server doing something smart and figuring out what ORDER BY clause should have been provided.

    In any case, if you supply the ORDER BY clause and it is not needed, then the worst it should do is occupy your fingers a bit longer as you type; however, if it is needed, it could significantly improve performance during and after the import.

    Ralph D. Wilson II
    Development DBA

    "Give me 6 hours to chop down a tree and I will spend the first 4 sharpening the ax."
    A. Lincoln