Bug 25661 - auth_header missing authtypecode index
Summary: auth_header missing authtypecode index
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Reported: 2020-06-03 03:04 UTC by David Cook
Modified: 2020-06-03 03:04 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2020-06-03 03:04:21 UTC
While code like tools/export.pl and Koha/MetadataRecord/Authority.pm all seem to rely primarily on the authid primary key, it seems to me that there are scenarios where you want to report on authority records using only the authtypecode field.

At the moment, the database has to do a row scan through every auth_header row in order to determine which records to return.

If we used an authtypecode index, the database would be able to process the search query much quicker and do much less work on the backend.