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

Missing indexes for inverse lookup on *_gid_redirect tables

      The *_gid_redirect tables used to be used only for lookups by MBID, for which there is an index due to the MBID (gid column) being the primary key. However, now there is a load_gid_redirects method for JSON-LD that queries these tables by new_id instead, requiring a sequential scan of the whole table (since the 2015-01-12 release). Indexes on that column need to be added.

          [MBS-8288] Missing indexes for inverse lookup on *_gid_redirect tables

          Roman added a comment -

          Roman added a comment - https://github.com/metabrainz/musicbrainz-server/pull/285

          Roman added a comment -

          Roman added a comment - https://github.com/metabrainz/musicbrainz-server/pull/283

          Ulrich Klauer added a comment -

          The largest table by far is the one for recordings with 1.3 million rows. Works have 120000. So an index for recordings might suffice.

          Ulrich Klauer added a comment - The largest table by far is the one for recordings with 1.3 million rows. Works have 120000. So an index for recordings might suffice.

          Ulrich Klauer added a comment -

          ruaok added something on totoro, but I don't know exactly what, and it needs to go into the CreateIndexes.sql script in any case.

          Ulrich Klauer added a comment - ruaok added something on totoro, but I don't know exactly what, and it needs to go into the CreateIndexes.sql script in any case.

            roman Roman
            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