Activiti
  1. Activiti
  2. ACT-1209

Mybatis pagination does not scale on MySQL & H2

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.9
    • Fix Version/s: 5.10
    • Component/s: Engine
    • Labels:
      None
    • Source ID:
      HEMERA-2165
    • Number of attachments :
      0

      Description

      On MySQL and H2, mybatis pagination does not scale: if you do a

      taskService.createTaskQuery().listPage(0,1)

      Mybatis issues a SELECT * FROM ACT_RU_TASK_ (without something like "LIMIT 0,1").

      Under the hood, Mybatis tries to use Scrollable JDBC ResultSets which is only partially supported on MySQL and H2.

      This causes the database to fetch ALL records and cache them in memory where we then only use a certain page.

        Activity

        Hide
        Daniel Meyer (camunda) added a comment -

        This is probably also an issue on other databases besides MySQL and H2, I have not tested there yet.

        Show
        Daniel Meyer (camunda) added a comment - This is probably also an issue on other databases besides MySQL and H2, I have not tested there yet.
        Hide
        Daniel Meyer (camunda) added a comment -

        Implemented for h2, mysql, postgres, oracle
        http://fisheye.codehaus.org/changelog/activiti/?cs=3414

        Show
        Daniel Meyer (camunda) added a comment - Implemented for h2, mysql, postgres, oracle http://fisheye.codehaus.org/changelog/activiti/?cs=3414
        Hide
        Daniel Meyer (camunda) added a comment -

        Anyone interested in implementing this for db2 / mssql ?

        Show
        Daniel Meyer (camunda) added a comment - Anyone interested in implementing this for db2 / mssql ?
        Hide
        Bernd Ruecker (camunda) added a comment -

        Hi Daniel, maybe you can give Stefan a hint how he can test/verify this? I think he would be happy to volunteer

        Show
        Bernd Ruecker (camunda) added a comment - Hi Daniel, maybe you can give Stefan a hint how he can test/verify this? I think he would be happy to volunteer

          People

          • Assignee:
            Daniel Meyer (camunda)
            Reporter:
            Daniel Meyer (camunda)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: