Performance enhancing DBRev:132
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Fri, 30 Apr 2010 22:19:51 +0000 (00:19 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Sat, 1 May 2010 13:50:35 +0000 (09:50 -0400)
Adding an index on language_descriptions table in order to boost searches

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 3d5c2fe..cfa1ff3 100755 (executable)
@@ -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)
 
index 381bc45..386a158 100644 (file)
@@ -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