[Koha-patches] [PATCH] Bug 16855 - Poor performance due to high overhead of SQL call in export.pl

Srdjan srdjan at catalyst.net.nz
Wed Jul 6 06:11:00 CEST 2016


From: Nick Clemens <nick at bywatersolutions.com>

This patch eliminates all columns retrieved in the biblioitems query
except for biblionumber.

To test:
1 - Go to tools->Export data
2 - Export using various filters and note you get expected records
3 - Apply patch
4 - Ensure exported results match results before patch

Signed-off-by: Srdjan <srdjan at catalyst.net.nz>
---
 tools/export.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/export.pl b/tools/export.pl
index 4794d05..373ebfa 100755
--- a/tools/export.pl
+++ b/tools/export.pl
@@ -148,7 +148,7 @@ if ( $op eq "export" ) {
                     ),
 
                 };
-                my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items' } );
+                my $biblioitems = Koha::Biblioitems->search( $conditions, { join => 'items', columns => 'biblionumber' } );
                 while ( my $biblioitem = $biblioitems->next ) {
                     push @record_ids, $biblioitem->biblionumber;
                 }
-- 
2.7.4


More information about the Koha-patches mailing list