summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-07-12 02:34:46 +0200
committerbugreport%peshkin.net <>2005-07-12 02:34:46 +0200
commit7e546edc8f6666bb4b7dc8bd502251b666bd60c0 (patch)
tree76428ddd0ccb0d5db304134ab7ac1508866067c6
parent07578c0a572fe5e5966a0ec3e1bc38a7f0ead834 (diff)
downloadbugzilla-7e546edc8f6666bb4b7dc8bd502251b666bd60c0.tar.gz
bugzilla-7e546edc8f6666bb4b7dc8bd502251b666bd60c0.tar.xz
Bug 299156: Reduce saniitycheck submitter_id time for large sites
Patch by Joel Peshkin <bugreport@peshkin.net> r=mkanat, a=justdave
-rw-r--r--Bugzilla/DB/Schema.pm2
-rwxr-xr-xchecksetup.pl12
2 files changed, 11 insertions, 3 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 52d1b3212..300a97b98 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -310,7 +310,7 @@ use constant ABSTRACT_SCHEMA => {
INDEXES => [
attachments_bug_id_idx => ['bug_id'],
attachments_creation_ts_idx => ['creation_ts'],
- attachments_submitter_id_idx => ['submitter_id'],
+ attachments_submitter_id_idx => ['submitter_id', 'bug_id'],
],
},
diff --git a/checksetup.pl b/checksetup.pl
index 8b39c3ec2..d0652716f 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -3771,8 +3771,6 @@ if ($emptygroupid) {
}
# 2005-02-12 bugreport@peshkin.net, bug 281787
-$dbh->bz_add_index('attachments', 'attachments_submitter_id_idx',
- [qw(submitter_id)]);
$dbh->bz_add_index('bugs_activity', 'bugs_activity_who_idx', [qw(who)]);
# This lastdiffed change and these default changes are unrelated,
@@ -3993,6 +3991,16 @@ AddGroup('editcomponents', 'Can create, destroy, and edit components.');
AddGroup('editkeywords', 'Can create, destroy, and edit keywords.');
AddGroup('admin', 'Administrators');
+# 2005-06-29 bugreport@peshkin.net, bug 299156
+if ($dbh->bz_index_info('attachments', 'attachments_submitter_id_idx')
+ && (scalar(@{$dbh->bz_index_info('attachments',
+ 'attachments_submitter_id_idx'
+ )->{FIELDS}}) < 2)
+ ) {
+ $dbh->bz_drop_index('attachments', 'attachments_submitter_id_idx');
+}
+$dbh->bz_add_index('attachments', 'attachments_submitter_id_idx',
+ [qw(submitter_id bug_id)]);
if (!GroupDoesExist("editbugs")) {
my $id = AddGroup('editbugs', 'Can edit all bug fields.', ".*");