Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-8656

Bring edit table indexes back into sync

XMLWordPrintable

      As it turns out, the production database has quite a few indexes that apparently were created for testing purposes once upon a time, but never removed. This cruft causes unnecessary overhead for all updates on the edit tables and takes up HD space. It is also confusing for developers when these phantom indexes appear in execution plans. Finally, they are not consistent with what is listed in the admin/sql scripts and what slave servers have.

      These indexes should be dropped:

      • edit_close_time_idx (exact duplicate of existing edit_idx_close_time)
      • edit_date_trunc_idx
      • edit_date_trunc_idx1
      • edit_date_trunc_idx2
      • edit_id_idx
      • edit_open_time_idx1
      • edit_status_idx

      This index should be renamed:

      • edit_open_time_idx, to edit_idx_open_time

      For reference, the current state of the table is attached to this ticket.

      (This change is not actually tied to a schema change, but will take a short downtime because DROP INDEX CONCURRENTLY is not available in Postgres 9.1. If we have a planned downtime before the next schema change, we could do it at that time.)

            bitmap Michael Wiencek
            chirlu Ulrich Klauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                Schema change, 2016-05-23