[Koha-patches] [PATCH 09/12] Performance enhancing DBRev:132

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Sat May 1 00:19:51 CEST 2010


Adding an index on language_descriptions table in order to boost searches
---
 installer/data/mysql/updatedatabase.pl |   10 ++++++++++
 kohaversion.pl                         |    2 +-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 9aa760b..554ca0b 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3580,6 +3580,16 @@ INSERT IGNORE INTO message_transport_types (message_transport_type) VALUES ('pri
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.01.00.132";
+#3.02.00.023
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+	$dbh->do(q{
+    ALTER TABLE language_descriptions ADD INDEX LANG (subtag, type, lang);
+    });
+    print "Upgrade to $DBversion done (Adding index to language_descriptions table)\n";
+    SetVersion ($DBversion);
+}
+
 
 =item DropAllForeignKeys($table)
 
diff --git a/kohaversion.pl b/kohaversion.pl
index 381bc45..386a158 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.01.00.131';
+    our $VERSION = '3.01.00.132';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install
-- 
1.6.3.3




More information about the Koha-patches mailing list