Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-2579

Add table index

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Fix
    • L3 - Default
    • None
    • None
    • engine

    Description

      This query:

      processInstances = historyService
      .createHistoricProcessInstanceQuery()
      .finishedBefore(minDate.getTime())
      .processDefinitionKey(processDefinitionKey)
      .orderByProcessInstanceEndTime().asc().list();

      Leads to this SQL command:

      select RES.*
      from ACT_HI_PROCINST RES
      inner join ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_
      WHERE DEF.KEY_ = 'ADefKey'
      and RES.END_TIME_ <= '2014-06-06 12:12:12'
      and RES.END_TIME_ is not NULL
      order by END_TIME_ asc
      LIMIT 2147483647 OFFSET 0;

      When a high load is present, this can lead to long waiting times (with over 80,000 entries -> 500-700 seconds).

      This can be reduced to <1 second with this index:

      create index PROC_DEF_ID_END_TIME ON ACT_HI_PROCINST (PROC_DEF_ID_,END_TIME_);

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              matthijs.burke Matthijs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce