Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-11162

Indexing after installing JAG for the first time takes ages.

      Trying to install JAG for the first time or updating from versions previous to 6.4 where LexoRank was introduced makes Indexing take 11hs or more.

      There are 2 problems here:

      1) https://jira.atlassian.com/browse/GHS-11143
      This issue is impacting heavily over the speed of indexing and must be fixed.

      2) This ticket: https://jdog.jira-dev.com/browse/SW-432 introduce a heavy bug over Oracle. We should not do NSL_SORT over an index column cause it make the index useless and asks for a full table scan.

      I removed this part of the code in com.atlassian.greenhopper.manager.lexorank.SqlExplicitSortLanguageFunction:

      public String toSql(DatabaseType dbType)
          {
      /*
              if(dbType.getFamily().equals(DatabaseFamily.ORACLE))
              {
                  StringBuilder sql = new StringBuilder("NLSSORT(")
                          .append(columnName)
                          .append(", 'NLS_SORT = ").append(sortLanguage.getProperty(DatabaseFamily.ORACLE))
                          .append("')");
      
                  return sql.toString();
              }
              else
              {
      */
                  // just return the column name
                  return columnName;
        //      }
          }
      

      And that also improved the performance.
      We should revert all the code about that ticket and document and advice customers which NSL_SORT we want in the db and not hardcoding what we would expect.

      We need to talk to acourtis if we can configure the index or the column to be created with the necessary configuration from scratch.

      Attached is the patch that improve the performance

      You can see here :

      That its taking 90% of the JDBC calls.

      While after the patch the same is taking :

      what a normal query should.

      We need to find a way to fix the search for Oracle
      For Oracle DB we should have a way to change the DB schema parameter or changing the index capability of AO.
      If not we should document or communicate to our Oracle users that this is going to rely on their configuration.

          Form Name

            [JSWSERVER-11162] Indexing after installing JAG for the first time takes ages.

            Bugfix Automation Bot made changes -
            Minimum Version New: 6.04
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2852104 ] New: JAC Bug Workflow v3 [ 2937041 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v7 - Restricted [ 2545977 ] New: JAC Bug Workflow v2 [ 2852104 ]
            Ignat (Inactive) made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 - Restricted [ 1550960 ] New: JIRA Bug Workflow w Kanban v7 - Restricted [ 2545977 ]
            Confluence Escalation Bot (Inactive) made changes -
            Labels Original: fixme lexorank lexorank-perf oracle warranty New: affects-server fixme lexorank lexorank-perf oracle warranty
            Owen made changes -
            Workflow Original: JIRA Bug Workflow w Kanban v6 [ 909822 ] New: JIRA Bug Workflow w Kanban v6 - Restricted [ 1550960 ]
            M (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 78816 ] New: This issue links to "Page (Extranet)" [ 78816 ]
            Roger Barnes (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 84499 ] New: This issue links to "Page (Extranet)" [ 84499 ]
            Roger Barnes (Inactive) made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 84499 ] New: This issue links to "Page (Extranet)" [ 84499 ]
            Dave C made changes -
            Remote Link Original: This issue links to "Page (Extranet)" [ 84499 ] New: This issue links to "Page (Extranet)" [ 84499 ]

              Unassigned Unassigned
              ckhatchikian Carlos Khatchikian
              Affected customers:
              8 This affects my team
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: