Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimisations des requêtes SQL (1/4) #845

Merged
merged 11 commits into from
May 13, 2023
Merged

Conversation

raphodn
Copy link
Member

@raphodn raphodn commented May 7, 2023

Quoi ?

  • utiliser fetch="EAGER" pour réduire le nombre de requêtes N+1
  • ajouter des leftJoin / addSelect
Page Nombre de requêtes avant Nombre de requêtes après Commentaire
/ 41 31
/booking 13 pas de besoins d'optimisations
/schedule 7 pas de besoins d'optimisations
/period 810 ⚠️ #846
user/pre_users 63 43 ✅ (améliorations possibles, mais pas prioritaire)
ambassador/noregistration 79 23
ambassador/lateregistration ?
/admin/users 341 ⚠️ 11 🎉
/member/2121/show 2825 ⚠️ #848
ambassador/shifttimelog 184 ⚠️ 9 🎉
/admin/membershipshiftexemption/ 302 ⚠️ 11 🎉
/commissions 11 pas de besoins d'optimisations
/admin/formations 27 pas de besoins d'optimisations
/booking/admin 238 ⚠️ 238 #847
/admin/shifts/freelogs/ 28 12
/period/admin 459 ⚠️ 451 #846
/event 9 8
/helloasso/payments 155 ⚠️ 106 todo

todo = prochaine PR

@raphodn raphodn self-assigned this May 8, 2023
@raphodn raphodn requested review from symartin and petitalb and removed request for symartin May 8, 2023 22:02
@raphodn raphodn changed the title Optimisations des requêtes SQL Optimisations des requêtes SQL (1/2) May 9, 2023
@raphodn raphodn changed the title Optimisations des requêtes SQL (1/2) Optimisations des requêtes SQL (1/4) May 9, 2023
@petitalb petitalb force-pushed the raphodn/cleanup-optimizations branch from 40fc03a to 85cadc6 Compare May 13, 2023 05:47
@raphodn raphodn merged commit 58634a3 into master May 13, 2023
@raphodn raphodn deleted the raphodn/cleanup-optimizations branch May 13, 2023 07:12
@raphodn raphodn linked an issue May 21, 2023 that may be closed by this pull request
OursDesCavernes pushed a commit to Les400Coop/gestion-compte that referenced this pull request Jan 20, 2024
* MembershipShiftExemption: always prefetch ShiftExemption

* Membership autocomplete: prefetch beneficiaries

* Event: always prefetch EventKind

* Shift: always prefetch Job

* ShiftFreeLog: always prefetch Shift

* Event: fix queries

* Position: prefetch Job

* User search: prefetch Formation, Commission, MembershipShiftExemptions

* Registration: prefetch HelloassoPayments

* Extra optimizations in ambassador search

* AnonymousBeneficiary: prefetch registrar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimiser les requêtes SQL
2 participants