# Manager::StatsController#load_data

- **Period:** 23 Jun 06:04 UTC – 24 Jun 06:03 UTC
- **Throughput**: 0.23 / min
- **Average:** 445.6 ms

## Most Impactful Sections
| Kind | Location | Avg ms | Avg calls | Impact | Command |
| ---- | -------- | -----: | --------: | -----: | ------- |
| queue | queue | 165.21 | 1.0 | 37.08% |  |
| sql | app/controllers/manager/stats_controller.rb:64 | 82.17 | 1.0 | 18.44% | `SELECT ? AS one FROM "needs" INNER JOIN "matches" ON "matches"."need_id" = "nee…` |
| sql | app/services/stats/base_stats.rb:83 | 266.26 | 0.21 | 12.81% | `SELECT "subject"."label" FROM "needs" INNER JOIN "diagnoses" ON "diagnoses"."id…` |
| sql | app/services/stats/base_stats.rb:177 | 78.27 | 0.29 | 5.02% | `SELECT COUNT(*) AS "count_all", DATE_TRUNC(?, Needs.created_at) AS "date_trunc_…` |
| view | app/views/stats/_load_stats.html.haml | 10.85 | 1.0 | 2.43% |  |
| sql | app/services/stats/matches/positioning.rb:16 | 13.49 | 0.45 | 1.35% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/taking_care_time.rb:22 | 6.63 | 0.89 | 1.33% | `SELECT COUNT(*) FROM "matches" INNER JOIN "needs" ON "needs"."id" = "matches"."…` |
| sql | app/services/stats/matches/taking_care_time.rb:23 | 6.41 | 0.89 | 1.29% | `SELECT COUNT(*) FROM "matches" INNER JOIN "needs" ON "needs"."id" = "matches"."…` |
| code | app/controllers/manager/stats_controller.rb:31 | 5.35 | 1.0 | 1.20% | `Manager::StatsController#load_data` |
| sql | app/services/stats/matches/taking_care.rb:20 | 11.23 | 0.45 | 1.12% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/done.rb:19 | 11.09 | 0.45 | 1.11% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/done_no_help.rb:20 | 10.71 | 0.45 | 1.07% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/done_not_reachable.rb:20 | 10.27 | 0.45 | 1.03% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |
| sql | app/services/stats/matches/not_positioning.rb:18 | 10.05 | 0.45 | 1.01% | `SELECT COUNT(DISTINCT "matches"."id") FROM "matches" INNER JOIN "needs" ON "nee…` |

[View on RoRvsWild ↗](https://www.rorvswild.com/applications/135976/requests/Manager::StatsController%23load_data?range=1d)