Bug 127200 - query for cc takes long time

r=mattyt, justdave
parent 99da5c19
...@@ -502,9 +502,12 @@ sub GenerateSQL { ...@@ -502,9 +502,12 @@ sub GenerateSQL {
}, },
"^cc," => sub { "^cc," => sub {
push(@supptables, push(@supptables, "cc cc_$chartid");
("LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid")); push(@wherepart, "bugs.bug_id = cc_$chartid.bug_id");
$f = "map_cc_$chartid.login_name";
push(@supptables, "profiles map_cc_$chartid");
push(@wherepart, "cc_$chartid.who = map_cc_$chartid.userid");
$f = "map_cc_$chartid.login_name";
}, },
"^long_?desc,changedby" => sub { "^long_?desc,changedby" => sub {
...@@ -616,7 +619,7 @@ sub GenerateSQL { ...@@ -616,7 +619,7 @@ sub GenerateSQL {
my $attachtable = "attachments_$chartid"; my $attachtable = "attachments_$chartid";
my $statustable = "attachstatuses_${chartid}_$statusid"; my $statustable = "attachstatuses_${chartid}_$statusid";
push(@supptables, "attachments $attachtable"); push(@supptables, "attachments $attachtable");
my $join = "LEFT JOIN attachstatuses $statustable ON ". my $join = "LEFT JOIN attachstatuses $statustable ON ".
"($attachtable.attach_id = $statustable.attach_id AND " . "($attachtable.attach_id = $statustable.attach_id AND " .
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment