文档:Hibernate中的数据库方言(Dialect)
http://note.youdao.com/noteshare?id=7d11a7bf13d8eae2decda70896ab529b&sub=76163EBA64A74F039A7F20A230E42A14
当使用Oracle10gDialect时分页为
SELECT
*
FROM
(
SELECT
row_.*,
rownum rownum_
FROM
(
select * from table
)
WHERE
rownum_ <= 30 and rownum_ > 20
当使用Oracle10gDialect时分页为
SELECT
*
FROM
(
SELECT
row_.*,
rownum rownum_
FROM
(
select * from table where rownum <= 30
)
WHERE
rownum_ > 20
后者比前者速度快100倍。