• Without any table DDL, index definitions, queries used and query plan we can only guess.

    Maybe because in the first query data was already presorted by an index, while in the second query the index could not be used to sort the data and thus it had to do more work?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP