• First thing is that there's absolutely no need for the temp table. Just do the select straight with the order by included.

    Which tables is it scanning and what do the indexes on that table look like?

    While it's running, look in sysprocesses and see if there's a last wait type. If so, what is it?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass