From 18c74c9d62573d77a1427aa92382db17255098d8 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 5 Jul 2016 14:49:35 -0400 Subject: [PATCH] Bug 16855 - Poor performance due to high overhead of SQL call in export.pl MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Kyle M Hall (cherry picked from commit a44bb07b88ba9d5049a64f88610a8bb8e82efe3a) Signed-off-by: Frédéric Demians (cherry picked from commit 0b40c96d2d7bb6e7f550698713fd4db7e6939960) Signed-off-by: Julian Maurice --- tools/export.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export.pl b/tools/export.pl index a72d463d3d..be1425fc35 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -147,7 +147,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.39.5