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

Job acquisition should only select columns that are required by the command

    Details

      Description

      Currently, the job acquisition query uses SELECT * to fetch all properties of a job. However, the command currently only requires these columns:

      * ID_
      * IS_EXCLUSIVE_
      * PROC_INST_ID_
      * REVISION_
      

      Reducing the select to those columns would allow users to create composite indexes on the columns used in the query such that the query can be answered by index access only.

      Furthermore, the command must be able to write LOCK_OWNER_ and LOCK_EXPIRATION_TIME_.

        Activity

        Hide
        thorben.lindhauer Thorben Lindhauer added a comment - - edited

        Columns that are used in the query:

        Exclusive_Check:

        * EXCLUSIVE_
        * PROCESS_INSTANCE_ID_
        * LOCK_OWNER_
        * LOCK_EXP_TIME_
        

        Acquirable-Check

        * DUEDATE_
        * LOCK_OWNER_
        * SUSPENSION_STATE_
        * DEPLOYMENT_ID_
        * RETRIES_
        

        Sorting

        * PRIORITY_
        * TYPE_
        * DUEDATE_
        

        Columns that are used neither in the query nor in the acquisition command:

        * EXECUTION_ID_
        * PROCESS_DEF_ID_
        * PROCESS_DEF_KEY_
        * EXCEPTION_STACK_ID_
        * EXCEPTION_MSG_
        * HANDLER_TYPE_
        * HANDLER_CFG_
        * JOB_DEF_ID_
        * TENANT_ID_
        * CREATE_TIME_
        * SEQUENCE_COUNTER_
        
        Show
        thorben.lindhauer Thorben Lindhauer added a comment - - edited Columns that are used in the query: Exclusive_Check: * EXCLUSIVE_ * PROCESS_INSTANCE_ID_ * LOCK_OWNER_ * LOCK_EXP_TIME_ Acquirable-Check * DUEDATE_ * LOCK_OWNER_ * SUSPENSION_STATE_ * DEPLOYMENT_ID_ * RETRIES_ Sorting * PRIORITY_ * TYPE_ * DUEDATE_ Columns that are used neither in the query nor in the acquisition command: * EXECUTION_ID_ * PROCESS_DEF_ID_ * PROCESS_DEF_KEY_ * EXCEPTION_STACK_ID_ * EXCEPTION_MSG_ * HANDLER_TYPE_ * HANDLER_CFG_ * JOB_DEF_ID_ * TENANT_ID_ * CREATE_TIME_ * SEQUENCE_COUNTER_

          People

          • Assignee:
            nikola.koevski Nikola Koevski
            Reporter:
            thorben.lindhauer Thorben Lindhauer
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development