[Koha-devel] How can I improve this report?

Doug Kingston dpk at randomnotes.org
Fri Jul 1 21:39:14 CEST 2022


Report: Authors not in Authorities

SELECT DISTINCT(author) AS heading FROM biblio WHERE author NOT IN (SELECT
ExtractValue(marcxml,'//datafield[@tag="100"]/subfield[@code="a"]') AS
heading FROM auth_header WHERE authtypecode='PERSO_NAME')ORDER BY heading

I am not a SQL expert, but I believe this is doing an unkeyed troll through
every authority record for every biblio (O(Nbibs * Mauths), which is pretty
bad).  I suspect we can do better by trolling Auths once to create a set
and then compare Bib authors against it.  How can we do this?

-Doug-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220701/a529efa1/attachment.htm>


More information about the Koha-devel mailing list