Git Product home page Git Product logo

Comments (8)

abel533 avatar abel533 commented on July 22, 2024

把最终执行的SQL用mybatis直接的方式或者JDBC的方式测试看看。

from mybatis-pagehelper.

trifolium-x avatar trifolium-x commented on July 22, 2024

@abel533 当我把ORDER BY子句删掉后抛出异常:
image

from mybatis-pagehelper.

trifolium-x avatar trifolium-x commented on July 22, 2024

这个错误似乎是正常的,好像sqlserver2012分页的情况下SQL语句必须要有ORDER BY子句

from mybatis-pagehelper.

trifolium-x avatar trifolium-x commented on July 22, 2024

@abel533 经过我的测试,用Mybatis原生拼接分页参数查询没有任何问题。

from mybatis-pagehelper.

trifolium-x avatar trifolium-x commented on July 22, 2024

不知道触发这个情况的机制是什么,在ORDER BY前面添加空行或者删除空行都会大概率触发查询最后一页非常缓慢的问题,查看生成的SQL发现也没有问题,就是非常缓慢,如果不使用PageHelper直接拼接分页参数就不会出现类似问题。

from mybatis-pagehelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.