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

History queries with authorization checks are slow

      Investigate performance of authorization checks for history queries on Oracle and evaluate improvements. Use https://github.com/camunda/camunda-bpm-platform/blob/master/qa/performance-tests-engine/src/test/java/org/camunda/bpm/qa/performance/engine/query/HistoryAuthorizationQueryPerformanceTest.java as a starting point.

        This is the controller panel for Smart Panels app

          1. Db2-105_001.png
            Db2-105_001.png
            189 kB
          2. Db2-105_002.png
            Db2-105_002.png
            187 kB
          3. Db2-105_003.png
            Db2-105_003.png
            189 kB
          4. Db2-97_001.png
            Db2-97_001.png
            225 kB
          5. Db2-97_002.png
            Db2-97_002.png
            227 kB
          6. HistroyProcessInstanceAuthorizationCheck_SQL_Query.sql
            5 kB

            [CAM-6839] History queries with authorization checks are slow

            christopher.zell We can have a quick chat about this on tuesday: basically it would mean that we use the join based authorization check for history as well

            Daniel Meyer added a comment - christopher.zell We can have a quick chat about this on tuesday: basically it would mean that we use the join based authorization check for history as well

            Christopher Kujawa added a comment - - edited

            Hi all,

            after adding the Authorization Join and reducing the where clause, we have fixed PostgreSQL performance issues and also the Oracle Performance issues.

            Following is a list of databases and the historic authorization execution time:

            MariaDB: 12,57 sec
            MySQL: 14,268 sec
            MsSQL: ? (Error lipphardt)
            Oracle 12: 16,216 sec
            PostgreSQL 93: 15,506 sec
            H2: 25,051 sec
            Oracle 10: ? (Error lipphardt)
            DB2 105: 15,265 sec
            DB2 97: 2,992.002 sec

            For more details see this table

            lipphardt since we have so different executions times, also on different version of databases, i think it will be interesting to execute the performance tests on all databases like the unit tests. Also we have to increase the timeout value since oracle 12 needs 20 mins for the creation of the test data, if the timeout value is below 20 min a timeout error is thrown.

            P.S.: It seems that on DB2 9.7 the HistoricActivityInstanceQuery is the Problem not the HistoricProcessInstanceQuery. See this report.

            Best regards,
            Chris

            Christopher Kujawa added a comment - - edited Hi all, after adding the Authorization Join and reducing the where clause, we have fixed PostgreSQL performance issues and also the Oracle Performance issues. Following is a list of databases and the historic authorization execution time: MariaDB : 12,57 sec MySQL : 14,268 sec MsSQL: ? ( Error lipphardt ) Oracle 12 : 16,216 sec PostgreSQL 93 : 15,506 sec H2 : 25,051 sec Oracle 10: ? ( Error lipphardt ) DB2 105 : 15,265 sec DB2 97 : 2,992.002 sec For more details see this table lipphardt since we have so different executions times, also on different version of databases, i think it will be interesting to execute the performance tests on all databases like the unit tests. Also we have to increase the timeout value since oracle 12 needs 20 mins for the creation of the test data, if the timeout value is below 20 min a timeout error is thrown. P.S.: It seems that on DB2 9.7 the HistoricActivityInstanceQuery is the Problem not the HistoricProcessInstanceQuery. See this report . Best regards, Chris

            Fixed the problem with DB2 9.7.

            Christopher Kujawa added a comment - Fixed the problem with DB2 9.7 .

              roman.smirnov Roman Smirnov
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: