We have a GROUP BY statement in Bugzilla::Bug::new that is *only* for the purpose of getting the vote count. Instead, we could easily have a special vote_count accessor function that got that data, and then we could eliminate a join, a group by, and the COALESCE(SUM) that's in Bugzilla::Bug::new.
LpSolit--this should block your "trim down Bugzilla::Bug->new" bug, but I can't find the bug number.
Created attachment 233386 [details] [diff] [review] v1 Okay, here it is. Easy enough. I checked, and this alone handles it.
Attachment #233386 - Flags: review?(LpSolit)
Comment on attachment 233386 [details] [diff] [review] v1 You don't need GROUP BY anymore. There are no more agregation functions.
Attachment #233386 - Flags: review?(LpSolit) → review-
Created attachment 233492 [details] [diff] [review] v2 Okay. I removed the GROUP BY. It goes away in a later patch (that I've already posted) anyway, but nothing wrong with getting rid of it here.
Comment on attachment 233492 [details] [diff] [review] v2 Tested on both MySQL and Pg. r=LpSolit
Attachment #233492 - Flags: review?(LpSolit) → review+
Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.133; previous revision: 1.132 done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.