登录 |

SQL分页查询优化

2005年11月23日 下午 39:24 | 作者:hemon

如下基础分页方案

  1. select top 页大小 *
  2. from table1
  3. where id >
  4. (select max (id) from
  5. (select top ((页码-1)*页大小) id from table1 order by id) as T --瓶颈
  6. )
  7. order by id


查看全文 »