Add an automated way to delete unused authority records

Bug #1792732 reported by Jane Sandberg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

Having a bunch of unused authority records in Evergreen can really slow down users who are trying to work with authorities. Koha includes a script to run to remove authorities that are not linked to any bib records. It would be nice if Evergreen included something similar: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/migration_tools/remove_unused_authorities.pl;h=f4e0ecbf2dc5eff5761ab20a44027ed6876d2db8;hb=refs/heads/master

Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thinking about this a bit more, I guess a simple way to do that would be to just issue the following SQL:

`UPDATE authority.record_entry SET deleted=TRUE WHERE NOT deleted AND id NOT IN (SELECT DISTINCT authority FROM authority.bib_linking)`

And then refine that SQL based on specific needs.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Hello Jane, here are my scripts/notes on purging authority records.

https://gist.github.com/stompro/d036829ff1fd4e0fe3dcddf8a75b4e77

This includes really deleting all the authority records at the end, to actually reduce table usage etc.

Josh

Elaine Hardy (ehardy)
tags: added: cat-authority
removed: authority
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.