Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13518

Drop unused DB indexes

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.5
    • Component/s: Database
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Unused DB indexes consume CPU and disk for nothing. See SC-2096 and SC-2134 as examples of indexes that have been successfully removed from SonarCloud.

      Execute the following SQL query select * from pg_stat_user_indexes where idx_scan = 0; in order to detect unused indexed.

      To be noted that indexes on events, ce_queue, notifications should probably not be removed.

      • EVENTS_UUID (duplicated by its PK)
      • CE_ACTIVITY_UUID (duplicated by its PK)
      • FILE_SOURCES_UPDATED_AT (not used)
      • USERS_UPDATED_AT (not used)
      • ALM_APP_INSTALLS_EXTERNAL_ID (method using it in tge DAO can be removed)

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            julien.lancelot Julien Lancelot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: