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)