Remove indexes that are not needed

Description

MODINVSTOR-514 complains that "Migrating from Fameflower to Goldenrod takes hours".

Go through https://github.com/folio-org/mod-inventory-storage/blob/master/src/main/resources/templates/db_scripts/schema.json and for each index that is not needed change "tOps": "ADD" to "tOps": "DELETE".

An index is not needed if the field no longer exist or if some other index is used.

Example for item barcode: There are 3 indexes: "index", "ginIndex", "fullTextIndex".

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Charlotte Whitt September 10, 2020 at 3:52 PM

- I like your definition: An index is not needed if the field no longer exist or if some other index is used.

The library staff would not want to perform a search on

  • data in a deprecated data element or

  • data searched by a search index which is replaced by another search index

Marc Johnson September 10, 2020 at 2:40 PM

For a full text search a ginIndex is not used when there exists a fullTextIndex.

Apologies, I don't think I understand what you mean. Are you saying that if a full index is present, it is not possible for any CQL query to ever use a gin index, and hence it is redundant?

Julian Ladisch September 10, 2020 at 2:26 PM

For a full text search a ginIndex is not used when there exists a fullTextIndex.

Marc Johnson September 10, 2020 at 2:06 PM

or if some other index is used.

Given that FOLIO's reference front-end provides a open ended CQL based query search, how can we determine if an index is not used?

Julian Ladisch September 10, 2020 at 2:04 PM

The description contains a definition for "not needed":

An index is not needed if the field no longer exist or if some other index is used.

Details

Assignee

Reporter

Priority

Development Team

Prokopovych

Affects versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created September 10, 2020 at 11:20 AM
Updated September 23, 2020 at 9:45 AM
TestRail: Cases
TestRail: Runs