# Manager::StatsController#load_data

- **Period:** 23 Jun 10:09 UTC – 23 Jun 13:28 UTC
- **Throughput**: 1.27 / min
- **Average:** 493.3 ms

## Most Impactful Sections
| Kind | Location | Avg ms | Avg calls | Impact | Command |
| ---- | -------- | -----: | --------: | -----: | ------- |
| queue | queue | 194.1 | 1.0 | 39.35% |  |
| sql | app/controllers/manager/stats_controller.rb:64 | 104.55 | 1.0 | 21.20% | `SELECT ? AS one FROM "needs" INNER JOIN "matches" ON "matches"."need_id" = "nee…` |
| sql | app/services/stats/base_stats.rb:83 | 187.57 | 0.21 | 8.15% | `SELECT "subject"."label" FROM "needs" INNER JOIN "diagnoses" ON "diagnoses"."id…` |
| sql | app/services/stats/base_stats.rb:177 | 89.92 | 0.29 | 5.21% | `SELECT COUNT(*) AS "count_all", DATE_TRUNC(?, Needs.created_at) AS "date_trunc_…` |
| view | app/views/stats/_load_stats.html.haml | 10.08 | 1.0 | 2.04% |  |
| sql | app/services/stats/matches/positioning.rb:16 | 17.17 | 0.41 | 1.44% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/taking_care_time.rb:22 | 8.22 | 0.83 | 1.37% | `SELECT COUNT(*) FROM "matches" INNER JOIN "needs" ON "needs"."id" = "matches"."…` |
| sql | app/services/stats/matches/taking_care_time.rb:23 | 7.96 | 0.83 | 1.33% | `SELECT COUNT(*) FROM "matches" INNER JOIN "needs" ON "needs"."id" = "matches"."…` |
| sql | app/services/stats/matches/done.rb:19 | 14.13 | 0.41 | 1.18% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/taking_care.rb:20 | 14.07 | 0.41 | 1.18% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/done_no_help.rb:20 | 13.39 | 0.41 | 1.12% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| code | app/controllers/manager/stats_controller.rb:31 | 5.31 | 1.0 | 1.08% | `Manager::StatsController#load_data` |
| sql | app/services/stats/matches/done_not_reachable.rb:20 | 12.82 | 0.41 | 1.07% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/not_positioning.rb:18 | 12.48 | 0.41 | 1.04% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/needs/transmitted.rb:17 | 12.24 | 0.41 | 1.02% | `SELECT COUNT(DISTINCT "needs"."id") FROM "needs" INNER JOIN "diagnoses" ON "dia…` |

[View on RoRvsWild ↗](https://www.rorvswild.com/applications/135976/requests/Manager::StatsController%23load_data?range=2026-06-23+10%3A09%3A45+UTC..2026-06-23+13%3A28%3A11+UTC)