Actions
Patch #16905
closedCount users with a single query on group list
Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:
0%
Estimated time:
Description
All users are loaded for each group, only to count them !
Files
Updated by Jérôme BATAILLE over 10 years ago
- File RM_16905_groups_index_users_count_optim.diff RM_16905_groups_index_users_count_optim.diff added
Here is the patch
Updated by Jean-Philippe Lang about 10 years ago
- Subject changed from Admin : groups otpimization of users count to Count users with a single query on group list
- Category changed from Groups to Code cleanup/refactoring
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 2.6.0
This patch didn't work for me, as the hash keys are strings (tested with postgresql):
irb(main):001:0> User.joins(:groups).group('group_id').count => {"98913"=>2}
Fix committed in r13149 with test.
Updated by Jérôme BATAILLE about 10 years ago
Jean-Philippe, thanks to have reviewed this patch.
Updated by Jean-Philippe Lang almost 10 years ago
- Status changed from Resolved to Closed
Updated by Jérôme BATAILLE over 7 years ago
Hi, you can indicate in the Resolution that's it's Fixed, if you have the time to, thanks a lot.
Updated by Toshi MARUYAMA over 7 years ago
Jérôme BATAILLE wrote:
Hi, you can indicate in the Resolution that's it's Fixed, if you have the time to, thanks a lot.
"patch" tracker does not have "resolution" filed.
Actions