Home >Database >Mysql Tutorial >特殊需求下Oracle分页的加速

特殊需求下Oracle分页的加速

WBOY
WBOYOriginal
2016-06-07 16:57:17995browse

Oracle分页大家一般使用这种形式 SELECT * FROM ( SELECT A.*, rownum r FROM ( SELECT * FROM Artic

  Oracle分页大家一般使用这种形式
  SELECT * FROM
  (
  SELECT A.*, rownum r
  FROM
  (
  SELECT *
  FROM Articles
  ORDER BY PubTime DESC
  ) A
  ) B
  WHERE r   and r > PageLowerBound;
  在很多时候,并不需要排序,而是要进行多表的联查计算等,这个时候数据多了就会显的很慢
  发现慢就慢在Order By上
  更改如下:
  SELECT * FROM
  (
  SELECT A.*, rownum r
  FROM
  (
  SELECT *
  FROM Articles
  ) A
  WHERE rownum   )B
  and r > PageLowerBound;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn