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.

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ckhatchikian Carlos Khatchikian
              Votes:
              8 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: