• Just one more thing, probably a "stupid" question but here it goes anyway 😉

    Temp tables created with SELECT .. INTO #temp FROM ... and then create clustered index ... on #temp (id) and create index ... on #temp (...) is slower than CREATE TABLE #temp (....) ... and then the INSERT INTO #temp SELECT ... FROM?

    And are the statistics on both methods the same?

    Thanks,

    Pedro



    If you need to work better, try working less...