https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19884
--- Comment #55 from Tomás Cohen Arazi <[email protected]> --- Hi David, I haven't been following this thread in full, but I suggest you take a look at this line of code: http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=opac/opac-ISBDdetail.pl;h=c79167cd31274cf115e99293bdd7fa7716c3d88d;hb=HEAD#l63 You will notice that there's actually a prefetch of the related metadata row and the (maybe multiple) items rows in the same query (through a LEFT JOIN). The same approach can be used for a resultset (i.e. not just a ->find returning a single Koha::Biblio). You can then acccess (without further queries to the DB) the MARC record through: $biblio->metadata->record I think the only missing thing here, would be a Koha::RecordProcessor filter (EmbedItems) that would take this resultset (so no new queries) and does the same thing your original code did. In short: heavy use of prefetch, and abandon the C4::Biblio and C4::Items routines. If you agree I could write the RecordProcessor filter. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
