From 72f1b94a0982ad665cc2ea9744636e4cfc7325c6 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 4 Dec 2012 08:52:21 -0500 Subject: [PATCH 1/2] Bug 9207 - Improve z39.50 speed slowdowns for sites with many records Signed-off-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d004fe1d64..221c4e4023 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -896,7 +896,8 @@ CREATE TABLE `import_records` ( CONSTRAINT `import_records_ifbk_1` FOREIGN KEY (`import_batch_id`) REFERENCES `import_batches` (`import_batch_id`) ON DELETE CASCADE ON UPDATE CASCADE, KEY `branchcode` (`branchcode`), - KEY `batch_sequence` (`import_batch_id`, `record_sequence`) + KEY `batch_sequence` (`import_batch_id`, `record_sequence`), + KEY `batch_id_record_type` (`import_batch_id`,`record_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 041040ad78..ee4aebacd2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6477,6 +6477,16 @@ if ( CheckVersion($DBversion) ) { } +$DBversion = "3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(qq{ + ALTER TABLE import_records ADD INDEX batch_id_record_type ( import_batch_id, record_type ); + }); + print "Upgrade to $DBversion done (Bug 9207: Add new index batch_id_record_type to import_records)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) From a971109d0cfac37e1438bb15511a113ebdd5f0dd Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Mon, 11 Mar 2013 08:56:08 -0400 Subject: [PATCH 2/2] Bug 9207: Increment version number Database update for bug 9207 has been given version 3.11.00.026 --- installer/data/mysql/updatedatabase.pl | 2 +- kohaversion.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ee4aebacd2..82654d8285 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6477,7 +6477,7 @@ if ( CheckVersion($DBversion) ) { } -$DBversion = "3.11.00.XXX"; +$DBversion = "3.11.00.026"; if ( CheckVersion($DBversion) ) { $dbh->do(qq{ ALTER TABLE import_records ADD INDEX batch_id_record_type ( import_batch_id, record_type ); diff --git a/kohaversion.pl b/kohaversion.pl index 7276d74785..60ef7ffebb 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.11.00.025'; + our $VERSION = '3.11.00.026'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install