错了打错了 select top 1000 row_number() over(order by pagetable_id) from View_table 这个语句都有问题
select top 1000 row_number() over(order by pagetable_id) from View_table如果直接是查询,那么没多大问题,如果是做子查询,楼主要把别名加上select top 1000 row_number() over(order by pagetable_id) as tid from View_table
with T as (select row_number() over(order by pagetable_id) from View_table ) select top 1000 * from T
看下执行计划,order by后的字段加索引试试,先把现在查询窗口的进程KILL掉。
这个语句都有问题
(select row_number() over(order by pagetable_id) from View_table
)
select top 1000 * from T