summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormyk%mozilla.org <>2005-04-20 06:43:37 +0200
committermyk%mozilla.org <>2005-04-20 06:43:37 +0200
commit3e681ef2457ac8205f95b48e42922b17153180e2 (patch)
treee280afdb6da6091d9a1e08fe2967dcbea83ab169
parent6f4fba5980af8a0670aa402eb046fc58a06cb1b8 (diff)
downloadbugzilla-3e681ef2457ac8205f95b48e42922b17153180e2.tar.gz
bugzilla-3e681ef2457ac8205f95b48e42922b17153180e2.tar.xz
Fix for bug 238800: speeds up editflagtypes.cgi list of flags to tolerable level by adding index on flags.type_id; r=justdave; a=justdave
-rw-r--r--Bugzilla/DB/Schema.pm1
-rwxr-xr-xchecksetup.pl6
2 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 8dce761d8..e0b49d859 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -371,6 +371,7 @@ use constant ABSTRACT_SCHEMA => {
flags_bug_id_idx => [qw(bug_id attach_id)],
flags_setter_id_idx => ['setter_id'],
flags_requestee_id_idx => ['requestee_id'],
+ flags_type_id_idx => ['type_id'],
],
},
diff --git a/checksetup.pl b/checksetup.pl
index 1831bc62d..a28b19a14 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -3890,6 +3890,12 @@ if ($dbh->bz_get_field_def('components', 'initialowner')->[2]) { # if NULL
'mediumint NOT NULL');
}
+# 2005-03-28 - bug 238800 - index flags.type_id to make editflagtypes.cgi speedy
+if (!defined $dbh->bz_get_index_def('flags','type_id')) {
+ print "Adding index for type_id column in flags table...\n";
+ $dbh->do('ALTER TABLE flags ADD INDEX (type_id)');
+}
+
} # END LEGACY CHECKS
# If you had to change the --TABLE-- definition in any way, then add your