========================================================================================== SUIVI #1214 — queries Mes tâches morph (volumes + delta SQL) 2026-08-08T01:56:29+00:00 DB: mysql / hectareenvol ========================================================================================== A. CROISEMENT RÉEL (données existantes, sans seed) ------------------------------------------------------------------------------------------ User #1 — tâches ouvertes visibles (réel) : 47 Liste SANS eager : 6 (morph selects=0) Liste AVEC eager : 7 (morph selects=1) Delta liste : 1 Resume badge seul: 6 Total page approx (liste+resume, AVEC) : 13 Requêtes AJOUTÉES par eager (réel liste) — 1 : 1. select `id`, `reference` from `dossiers_fonciers` where `dossiers_fonciers`.`id` in (2) Décomposition liste SANS eager (inventaire objet 4) — 6 : 1. [withCount checklist] select `taches_suivi`.*, (select count(*) from `tache_suivi_checklist_items` where `taches_suivi`.`id` = `tache_suivi_checklist_items`.`tache_suivi_id`) as `checklist_items_count`, (select count(*)... 2. [eager createur / personnes] select `id`, `name` from `users` where `users`.`id` in (1, 3, 18, 20, 28) 3. [pivot personnes (scope assigné / resume)] select `users`.`id`, `users`.`name`, `tache_suivi_personnes`.`tache_suivi_id` as `pivot_tache_suivi_id`, `tache_suivi_personnes`.`user_id` as `pivot_user_id`, `tache_suivi_personnes`.`assignee_at` ... 4. [eager étiquettes / programmes] select `etiquettes`.*, `tache_suivi_etiquette`.`tache_suivi_id` as `pivot_tache_suivi_id`, `tache_suivi_etiquette`.`etiquette_id` as `pivot_etiquette_id` from `etiquettes` inner join `tache_suivi_e... 5. [eager étiquettes / programmes] select `id`, `libelle` from `programmes` where `programmes`.`id` in (1, 2, 3, 5, 6) and `programmes`.`deleted_at` is null 6. [eager projet] select `id`, `uuid`, `nom` from `projets` where `projets`.`id` in (2) and `projets`.`deleted_at` is null Décomposition resume badge — 6 : 1. [compteur tasks op (resume badge)] select count(*) as `aggregate` from `tasks` where (`tasks`.`assignee_id` = ? or (`tasks`.`assignee_id` is null and `tasks`.`assignee_groupe_m365` is not null and `tasks`.`assignee_groupe_m365` in (... 2. [compteur tasks op (resume badge)] select count(*) as `aggregate` from `tasks` where (`tasks`.`assignee_id` = ? or (`tasks`.`assignee_id` is null and `tasks`.`assignee_groupe_m365` is not null and `tasks`.`assignee_groupe_m365` in (... 3. [compteur taches_suivi (resume badge)] select count(*) as `aggregate` from `taches_suivi` where `taches_suivi`.`statut` not in (?, ?) and (((`taches_suivi`.`attachable_type` is null or `taches_suivi`.`attachable_type` != ?) and (`taches... 4. [compteur taches_suivi (resume badge)] select count(*) as `aggregate` from `taches_suivi` where `taches_suivi`.`statut` not in (?, ?) and (((`taches_suivi`.`attachable_type` is null or `taches_suivi`.`attachable_type` != ?) and (`taches... 5. [compteur taches_suivi (resume badge)] select count(*) as `aggregate` from `taches_suivi` where `taches_suivi`.`statut` not in (?, ?) and (((`taches_suivi`.`attachable_type` is null or `taches_suivi`.`attachable_type` != ?) and (`taches... 6. [compteur taches_suivi (resume badge)] select count(*) as `aggregate` from `taches_suivi` where `taches_suivi`.`statut` not in (?, ?) and (((`taches_suivi`.`attachable_type` is null or `taches_suivi`.`attachable_type` != ?) and (`taches... B. TABLEAU MULTI-VOLUMES (seed + ROLLBACK) — liste seule ------------------------------------------------------------------------------------------ Tâches SANS AVEC Delta Morph Visible 10 6 7 1 1 57 50 6 7 1 1 97 --- SQL ajoutées @50 (1) --- 1. select `id`, `reference` from `dossiers_fonciers` where `dossiers_fonciers`.`id` in (2, 14, 15) 200 6 7 1 1 247 CONCLUSION DELTA : CONSTANT (= 1) aux volumes 10/50/200 C. VISIBILITÉ (seed 20 + rollback) — habilité vs non ------------------------------------------------------------------------------------------ Habilité (créateur #1) visibles : 67 Non-habilité (user #2) visibles : 64 Attendu : habilité ≥ 20 (seed) ; non-habilité = tâches perso éventuelles hors seed dossier. ========================================================================================== FIN diag #1214 ==========================================================================================