Best regards, evan Yin
in my application, i get bad performence of paged query , so i study the
source code. i find in ibatis, paged query is done through following steps:
1.setFetchSize(), if possible
2.execute()
3.absolute()/next
i think this method doesnt using the database feature, just a normal jdbc
deal.
why not using database feature to get better performce
in hibernate, they get good performce by using Dialect class to support
different database, like this for oracle:
if (hasOffset) {
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from (
");
}
else {
pagingSelect.append("select * from ( ");
}
pagingSelect.append(sql);
if (hasOffset) {
pagingSelect.append(" ) row_ ) where rownum_ <= ? and rownum_ > ?");
}
else {
pagingSelect.append(" ) where rownum <= ?");
}
so, could you developing this feature like this.