• 106
    • 49
    • Hide
      Atlassian Update – 11 December 2018

      Hi everyone,

      Thank you for your votes and thoughts on this issue. We fully understand that many of you are dependent on this functionality.

      After careful consideration, we've decided to prioritize adding Multi-Column Index to Jira Tables on Jira Server roadmap and already started development.

      To learn more on how you suggestions are reviewed, see our updated workflow for server feature suggestions.

      Kind regards,

      Jira Server Product Management

      Show
      Atlassian Update – 11 December 2018 Hi everyone, Thank you for your votes and thoughts on this issue. We fully understand that many of you are dependent on this functionality. After careful consideration, we've decided to prioritize adding Multi-Column Index to Jira Tables on Jira Server roadmap and already started development. To learn more on how you suggestions are reviewed, see our updated workflow for server feature suggestions. Kind regards, Jira Server Product Management
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Problem

      Some JIRA tables, like the propertyentry table contains many single column indexes, but many of the of SQL queries run by JIRA actually include checks for 2 or 3 of the columns.

      For example:
      propertyentry has indices on:

      jira728=# \d propertyentry ;
                 Table "public.propertyentry"
          Column    |          Type          | Modifiers
      --------------+------------------------+-----------
       id           | numeric(18,0)          | not null
       entity_name  | character varying(255) |
       entity_id    | numeric(18,0)          |
       property_key | character varying(255) |
       propertytype | numeric(9,0)           |
      Indexes:
          "pk_propertyentry" PRIMARY KEY, btree (id)
          "osproperty_all" btree (entity_id)
          "osproperty_entityname" btree (entity_name)
          "osproperty_propertykey" btree (property_key)
      

      A majority of the SQL queries run against this table include:

      • ENTITY_NAME, ENTITY_ID,PROPERTY_KEY
        SELECT ID, propertytype FROM propertyentry WHERE ENTITY_NAME= @P0  AND ENTITY_ID= @P1  AND PROPERTY_KEY= @P2
        
      • entity_name,entity_id
        select O_S_PROPERTY_ENTRY.property_key, O_S_PROPERTY_ENTRY.propertytype from propertyentry O_S_PROPERTY_ENTRY where O_S_PROPERTY_ENTRY.entity_name = :1 and O_S_PROPERTY_ENTRY.entity_id = :2 order by O_S_PROPERTY_ENTRY.id desc
        

      In these cases, it is left to the database to try and determine which index should be used, which is not always efficient. It may even cause extremely slow query times.

      Suggestion

      Add multi-column index to the table.

            [JRASERVER-65168] Add Multi-Column Index to JIRA Tables

            Hi everyone,
            Just a quick follow-up about the changes related to this issue that are coming down the pipeline with 8.0.
            Unfortunately, due to ZDU compatibility concerns, we are not targeting the 7.x series for this fix. That said, these changes can be performed manually by a dba on the 7.x side.

            So what's changing with 8.0? First, we're adding a new index on entity_id, entity_name, and property_key (except SqlServer, see details below). And second, we're dropping two of the table's existing indexes: os_property_all and entity_name.

            Beyond that, there's one added wrinkle worth mentioning: as the original issue description notes, for SqlServer 2014 and earlier, all three of the key-columns will not fit within the index-key. There's a size limit that would be violated. Thus, for this special case, we create an index-key on entity_id and entity_name and then add property_key as an included column.

            Thanks for again your patience!
            Seth

            Seth Utecht (Inactive) added a comment - Hi everyone, Just a quick follow-up about the changes related to this issue that are coming down the pipeline with 8.0. Unfortunately, due to ZDU compatibility concerns, we are not targeting the 7.x series for this fix. That said, these changes can be performed manually by a dba on the 7.x side. So what's changing with 8.0? First, we're adding a new index on entity_id , entity_name , and property_key (except SqlServer, see details below). And second, we're dropping two of the table's existing indexes: os_property_all and entity_name. Beyond that, there's one added wrinkle worth mentioning: as the original issue description notes, for SqlServer 2014 and earlier, all three of the key-columns will not fit within the index-key. There's a size limit that would be violated. Thus, for this special case, we create an index-key on entity_id and entity_name and then add property_key as an included column. Thanks for again your patience! Seth

            Hi everyone,

            Thank you for your votes and thoughts on this issue. We fully understand that many of you are dependent on this functionality.

            After careful consideration, we've decided to prioritize adding Multi-Column Index to Jira Tables on Jira Server roadmap and already started development.

            To learn more on how you suggestions are reviewed, see our updated workflow for server feature suggestions.

            Kind regards,

            Jira Server Product Management

            Grazyna Kaszkur added a comment - Hi everyone, Thank you for your votes and thoughts on this issue. We fully understand that many of you are dependent on this functionality. After careful consideration, we've decided to prioritize adding Multi-Column Index to Jira Tables on Jira Server roadmap and already started development. To learn more on how you suggestions are reviewed, see our updated workflow for server feature suggestions. Kind regards, Jira Server Product Management

              sutecht Seth Utecht (Inactive)
              dchan David Chan
              Votes:
              25 Vote for this issue
              Watchers:
              47 Start watching this issue

                Created:
                Updated:
                Resolved: