Add limit to recent group activity numbers
What does this MR do and why?
To improve performance of endpoints we need to limit data volume retrieved. This MR changes backend query to limit recent activity counters to 1000. There is no business value in showing precise number at group page.
Query plans
- Before: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/13312/commands/46710
- After: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/13312/commands/46711
Similar for MRs and Members count. Queries weren't changed much, but read volume should be limited now which should help with performance of very large and active groups.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #366919 (closed)
Edited by Pavel Shutsin