本帖最后由 soujb 于 2012-05-25 14:27:10 编辑

解决方案 »

  1.   

    楼主为何直接要查询10W多条数据,是前台分页用???
    看下执行计划,order by后的字段加索引试试,先把现在查询窗口的进程KILL掉。
      

  2.   

    错了打错了 select top 1000 row_number() over(order by pagetable_id) from View_table
    这个语句都有问题
      

  3.   

    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
      

  4.   

    with T  as
    (select row_number() over(order by pagetable_id) from View_table
    )
    select top 1000 *  from T
      

  5.   

    View_table  这个是一个真实的表
      

  6.   

    如果给 View_table这个表pagetable_id建立聚集索引 就不会出现占用资源不释放的情况