T-sql: how to perform optimised Paging?

前端 未结 3 1868
一个人的身影
一个人的身影 2021-01-05 04:34

I wrote the following code, it works fine, but it takes like 3 sec to complete if the table is containing a million record. Is there a way to optimize the following code.

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-05 04:44

    If someone is using SQL Server 2012 - a new feature was added in the ORDER BY clause, to query optimization of a set data, making work easier with data paging for anyone who writes in T-SQL as well for the entire Execution Plan in SQL Server. Reference here.

提交回复
热议问题