Bug 25661

Summary: auth_header missing authtypecode index
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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.