explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fAHb

Settings
# exclusive inclusive rows x rows loops node
1. 2.056 16,402.871 ↓ 336.0 672 1

Sort (cost=32,932.12..32,932.12 rows=2 width=1,933) (actual time=16,402.824..16,402.871 rows=672 loops=1)

  • Sort Key: y.order_master, y."order
  • Sort Method: quicksort Memory: 371kB
  • Planning time: 411.539 ms
  • Execution time: 16406.789 ms
2. 0.729 16,400.815 ↓ 336.0 672 1

Subquery Scan on y (cost=32,932.11..32,932.12 rows=2 width=1,933) (actual time=16,399.380..16,400.815 rows=672 loops=1)

3. 0.608 16,400.086 ↓ 336.0 672 1

Unique (cost=32,932.11..32,932.11 rows=2 width=1,934) (actual time=16,399.374..16,400.086 rows=672 loops=1)

4. 8.987 16,399.478 ↓ 672.0 1,344 1

Sort (cost=32,932.11..32,932.11 rows=2 width=1,934) (actual time=16,399.372..16,399.478 rows=1,344 loops=1)

  • Sort Key: "*SELECT* 1".fk_intervention, "*SELECT* 1".fk_intervention_type_associe, ((xl.id_planning_calendrier_zone IS NOT NULL)) DESC
  • Sort Method: quicksort Memory: 742kB
5. 8.935 16,390.491 ↓ 672.0 1,344 1

Hash Left Join (cost=32,924.85..32,932.11 rows=2 width=1,934) (actual time=3,953.006..16,390.491 rows=1,344 loops=1)

  • Hash Cond: (COALESCE("*SELECT* 1".fk_planning_calendrier_zone, xk.fk_planning_calendrier_zone) = xl.id_planning_calendrier_zone)
6. 12,426.763 16,381.531 ↓ 672.0 1,344 1

Nested Loop Left Join (cost=32,921.71..32,928.97 rows=2 width=1,873) (actual time=3,952.960..16,381.531 rows=1,344 loops=1)

  • Join Filter: ((xk.the_geom ~ st_transform(st_setsrid(st_makepoint(("*SELECT* 1".lng)::double precision, ("*SELECT* 1".lat)::double precision), 4326), 31370)) AND _st_contains(xk.the_geom, st_transform(st_setsrid(st_makepoint(("*SELECT* 1".lng)::double precision, ("*SELECT* 1".lat)::double precision), 4326), 31370)))
  • Rows Removed by Join Filter: 14784
7. 2.738 3,947.376 ↓ 336.0 672 1

Unique (cost=32,921.71..32,921.78 rows=2 width=1,869) (actual time=3,944.101..3,947.376 rows=672 loops=1)

8. 3.506 3,944.638 ↓ 336.0 672 1

Sort (cost=32,921.71..32,921.72 rows=2 width=1,869) (actual time=3,944.100..3,944.638 rows=672 loops=1)

  • Sort Key: "*SELECT* 1".fk_groupe, "*SELECT* 1".fk_intervention_maitre, "*SELECT* 1".fk_intervention, "*SELECT* 1".fk_intervention_type_associe, "*SELECT* 1".fk_conteneur, "*SELECT* 1"."order", "*SELECT* 1".order_master, "*SELECT* 1".report, "*SELECT* 1".report_apres_16h, "*SELECT* 1".date_report, "*SELECT* 1".depot, "*SELECT* 1".fk_partenaire, "*SELECT* 1".fk_type_partenaire, "*SELECT* 1".partenaire, "*SELECT* 1".rue, "*SELECT* 1".no, "*SELECT* 1".cp, "*SELECT* 1".localite, "*SELECT* 1".lat, "*SELECT* 1".lng, "*SELECT* 1".iso2_pays, "*SELECT* 1".hfrom1, "*SELECT* 1".hto1, "*SELECT* 1".hfrom2, "*SELECT* 1".hto2, "*SELECT* 1".poids_charger, "*SELECT* 1".volume_charger, "*SELECT* 1".coeff_volume_charger, "*SELECT* 1".duration_charger, "*SELECT* 1".poids_decharger, "*SELECT* 1".volume_decharger, "*SELECT* 1".coeff_volume_decharger, "*SELECT* 1".duration_decharger, "*SELECT* 1".type_vehicle_1, "*SELECT* 1".type_vehicle_2, "*SELECT* 1".type_vehicle_3, "*SELECT* 1".competence_1, "*SELECT* 1".competence_2, "*SELECT* 1".competence_3, "*SELECT* 1".competence_4, "*SELECT* 1".competence_5, "*SELECT* 1".competence_6, "*SELECT* 1".competence_7, "*SELECT* 1".competence_8, "*SELECT* 1".competence_9, "*SELECT* 1".competence_91, "*SELECT* 1".competence_92, "*SELECT* 1".competence_93, "*SELECT* 1".competence_94, "*SELECT* 1".localisation, "*SELECT* 1".fk_mission, "*SELECT* 1".help, "*SELECT* 1".turnover, "*SELECT* 1".cmt_1, "*SELECT* 1".cmpt_2, "*SELECT* 1".region, "*SELECT* 1".tour_position, "*SELECT* 1".fk_planning_calendrier_zone, "*SELECT* 1".est_actif_dans_ortec, "*SELECT* 1".lift, "*SELECT* 1".order_type, "*SELECT* 1".fk_tournee, "*SELECT* 1".hfrom_horaire, "*SELECT* 1".hto_horaire, "*SELECT* 1".est_horaire_valide, "*SELECT* 1".hfrom_theo, "*SELECT* 1".hto_theo, "*SELECT* 1".tournee_planifie
  • Sort Method: quicksort Memory: 371kB
9. 0.072 3,941.132 ↓ 336.0 672 1

Append (cost=32,504.93..32,921.71 rows=2 width=1,869) (actual time=3,924.168..3,941.132 rows=672 loops=1)

10. 0.720 3,925.539 ↓ 645.0 645 1

Subquery Scan on *SELECT* 1 (cost=32,504.93..32,505.34 rows=1 width=1,807) (actual time=3,924.167..3,925.539 rows=645 loops=1)

11. 0.532 3,924.819 ↓ 645.0 645 1

Unique (cost=32,504.93..32,505.34 rows=1 width=1,809) (actual time=3,924.163..3,924.819 rows=645 loops=1)

12. 7.980 3,924.287 ↓ 5.9 1,582 1

Sort (cost=32,504.93..32,505.07 rows=269 width=1,809) (actual time=3,924.162..3,924.287 rows=1,582 loops=1)

  • Sort Key: pp.fk_intervention, pp.fk_intervention_type_associe, ((tt5.fk_type = 1)) DESC, ((tt5.fk_type = 9)) DESC
  • Sort Method: quicksort Memory: 864kB
13. 7.968 3,916.307 ↓ 5.9 1,582 1

Hash Left Join (cost=24,198.82..32,502.76 rows=269 width=1,809) (actual time=2,853.173..3,916.307 rows=1,582 loops=1)

  • Hash Cond: (tt4.vehicule = tt5.id_planning_driver)
  • Join Filter: CASE WHEN (pp.fk_planning_driver_flux IS NOT NULL) THEN (tt5.id_planning_driver = pp.fk_planning_driver_flux) ELSE true END
14. 1.896 3,879.692 ↓ 5.9 1,582 1

Nested Loop Left Join (cost=24,193.03..29,815.90 rows=269 width=1,583) (actual time=2,852.924..3,879.692 rows=1,582 loops=1)

15. 1.248 3,874.632 ↓ 5.9 1,582 1

Nested Loop Left Join (cost=24,192.94..29,782.29 rows=269 width=1,583) (actual time=2,852.917..3,874.632 rows=1,582 loops=1)

16. 288.945 3,870.220 ↓ 5.9 1,582 1

Nested Loop Left Join (cost=24,192.86..29,756.19 rows=269 width=1,583) (actual time=2,852.911..3,870.220 rows=1,582 loops=1)

  • Join Filter: (SubPlan 2)
  • Rows Removed by Join Filter: 296581
17. 0.695 2,881.088 ↓ 645.0 645 1

Nested Loop Left Join (cost=24,192.77..28,757.51 rows=1 width=1,587) (actual time=2,852.905..2,881.088 rows=645 loops=1)

18. 1.779 2,879.103 ↓ 645.0 645 1

Nested Loop Anti Join (cost=24,192.71..28,754.45 rows=1 width=1,587) (actual time=2,852.898..2,879.103 rows=645 loops=1)

19. 1.408 2,874.744 ↓ 645.0 645 1

Subquery Scan on pp (cost=24,192.62..28,751.35 rows=1 width=1,595) (actual time=2,852.849..2,874.744 rows=645 loops=1)

  • Filter: ((pp.id_planning_rendezvous = pp.fk_planning_rendezvous_compare) AND CASE WHEN ((pp.libelle_mission)::text = 'RECUPEL'::text) THEN (((SubPlan 3) = 0) AND ((SubPlan 4) > 0)) ELSE true END)
20. 11.831 2,866.298 ↓ 2.7 645 1

Unique (cost=24,192.62..24,192.99 rows=243 width=1,866) (actual time=2,852.843..2,866.298 rows=645 loops=1)

21. 719.440 2,854.467 ↓ 55.7 13,533 1

Sort (cost=24,192.62..24,192.75 rows=243 width=1,866) (actual time=2,852.838..2,854.467 rows=13,533 loops=1)

  • Sort Key: b.fk_intervention, c.id_intervention_type_associe, ((b.date_fin IS NULL)) DESC, b.date_fin DESC, ((f.fk_flux_noeud_type = 1)) DESC, ((hh2.id_conteneur = p3.id_conteneur)) DESC, ((hh.id_conteneur = p3.id_conteneur)) DESC, f."position" DESC, ((j.fk_type = 6)) DESC, j.est_master DESC, ((j2.fk_type = 6)) DESC, j2.est_master DESC, (CASE WHEN (e.id_mission = 2) THEN (xv.creation_time <= (((a.date)::text || ' 16:00:00'::text))::timestamp without time zone) ELSE (xv.creation_time < (((a.date)::text || ' 16:00:00'::text))::timestamp without time zone) END) DESC, xv.creation_time DESC, tu1."position" DESC
  • Sort Method: quicksort Memory: 7362kB
22. 434.430 2,135.027 ↓ 55.7 13,533 1

Nested Loop Left Join (cost=59.59..24,190.70 rows=243 width=1,866) (actual time=6.342..2,135.027 rows=13,533 loops=1)

23. 27.826 996.881 ↓ 55.7 13,533 1

Nested Loop Left Join (cost=59.50..16,946.51 rows=243 width=505) (actual time=6.158..996.881 rows=13,533 loops=1)

24. 23.969 928.456 ↓ 55.7 13,533 1

Nested Loop (cost=59.44..16,499.38 rows=243 width=501) (actual time=6.147..928.456 rows=13,533 loops=1)

25. 17.901 836.822 ↓ 55.7 13,533 1

Nested Loop (cost=59.36..16,043.65 rows=243 width=483) (actual time=6.138..836.822 rows=13,533 loops=1)

26. 11.004 785.972 ↓ 13.8 4,707 1

Nested Loop (cost=59.27..15,234.02 rows=342 width=475) (actual time=6.127..785.972 rows=4,707 loops=1)

  • Join Filter: (b.fk_intervention = tu.fk_intervention)
27. 8.990 751.443 ↓ 32.7 4,705 1

Hash Left Join (cost=59.18..14,962.78 rows=144 width=499) (actual time=6.113..751.443 rows=4,705 loops=1)

  • Hash Cond: (t4.vehicule = t5.id_planning_driver)
28. 7.346 742.331 ↓ 32.7 4,705 1

Nested Loop Left Join (cost=53.39..14,956.91 rows=144 width=497) (actual time=5.983..742.331 rows=4,705 loops=1)

29. 10.150 711.460 ↓ 32.7 4,705 1

Nested Loop Left Join (cost=53.30..14,687.07 rows=144 width=481) (actual time=5.972..711.460 rows=4,705 loops=1)

30. 8.366 682.490 ↓ 32.7 4,705 1

Nested Loop Left Join (cost=53.22..14,418.47 rows=144 width=461) (actual time=5.962..682.490 rows=4,705 loops=1)

  • Join Filter: (t2.fk_donneur_ordre = t1.id_planning_agenda_donneur_ordre)
  • Rows Removed by Join Filter: 185
31. 5.198 650.599 ↓ 32.7 4,705 1

Nested Loop Left Join (cost=53.13..12,895.18 rows=144 width=465) (actual time=5.949..650.599 rows=4,705 loops=1)

  • Join Filter: (t1.date_agenda = a.date)
32. 7.215 640.696 ↓ 32.7 4,705 1

Nested Loop Left Join (cost=53.08..12,891.55 rows=144 width=461) (actual time=5.938..640.696 rows=4,705 loops=1)

33. 8.283 605.251 ↓ 151.8 4,705 1

Nested Loop Left Join (cost=52.99..12,805.94 rows=31 width=449) (actual time=5.928..605.251 rows=4,705 loops=1)

  • Join Filter: (xu.fk_date = a.id_calendrier)
34. 7.667 587.558 ↓ 151.8 4,705 1

Nested Loop Anti Join (cost=52.93..12,751.24 rows=31 width=440) (actual time=5.921..587.558 rows=4,705 loops=1)

35. 10.002 561.071 ↓ 151.8 4,705 1

Nested Loop Anti Join (cost=52.85..12,690.80 rows=31 width=440) (actual time=5.910..561.071 rows=4,705 loops=1)

  • Join Filter: ((xk_1.creation_time)::date < a.date)
36. 7.791 536.954 ↓ 151.8 4,705 1

Nested Loop Left Join (cost=52.76..12,632.85 rows=31 width=440) (actual time=5.900..536.954 rows=4,705 loops=1)

37. 6.665 524.458 ↓ 151.8 4,705 1

Nested Loop (cost=52.68..12,574.93 rows=31 width=440) (actual time=5.895..524.458 rows=4,705 loops=1)

  • Join Filter: (j2.fk_pays = m2.id_pays)
38. 8.593 517.793 ↓ 151.8 4,705 1

Nested Loop Anti Join (cost=52.68..12,573.01 rows=31 width=441) (actual time=5.887..517.793 rows=4,705 loops=1)

  • Join Filter: ((xs.debut_statut)::date < a.date)
39. 9.462 480.286 ↓ 130.2 4,819 1

Nested Loop Left Join (cost=52.59..12,490.90 rows=37 width=441) (actual time=5.873..480.286 rows=4,819 loops=1)

40. 10.524 461.186 ↓ 130.2 4,819 1

Nested Loop (cost=52.53..12,423.32 rows=37 width=426) (actual time=5.865..461.186 rows=4,819 loops=1)

41. 9.931 436.205 ↓ 130.2 4,819 1

Nested Loop (cost=52.45..12,354.27 rows=37 width=408) (actual time=5.859..436.205 rows=4,819 loops=1)

42. 5.723 406.998 ↓ 130.2 4,819 1

Nested Loop Left Join (cost=52.36..12,285.06 rows=37 width=346) (actual time=5.850..406.998 rows=4,819 loops=1)

43. 7.566 391.637 ↓ 130.2 4,819 1

Nested Loop (cost=52.28..12,215.93 rows=37 width=346) (actual time=5.845..391.637 rows=4,819 loops=1)

  • Join Filter: (j.fk_pays = m.id_pays)
44. 7.809 384.071 ↓ 130.2 4,819 1

Nested Loop (cost=52.28..12,213.84 rows=37 width=347) (actual time=5.831..384.071 rows=4,819 loops=1)

45. 5.668 356.986 ↓ 39.2 4,819 1

Nested Loop (cost=52.19..11,984.07 rows=123 width=339) (actual time=5.826..356.986 rows=4,819 loops=1)

46. 8.527 332.042 ↓ 39.2 4,819 1

Nested Loop Left Join (cost=52.10..11,753.12 rows=123 width=331) (actual time=5.820..332.042 rows=4,819 loops=1)

47. 9.253 313.877 ↓ 39.2 4,819 1

Nested Loop (cost=52.05..11,528.48 rows=123 width=316) (actual time=5.811..313.877 rows=4,819 loops=1)

48. 10.317 285.348 ↓ 39.2 4,819 1

Nested Loop (cost=51.96..11,298.91 rows=123 width=298) (actual time=5.801..285.348 rows=4,819 loops=1)

49. 4.910 255.755 ↓ 38.9 4,819 1

Nested Loop (cost=51.87..11,066.96 rows=124 width=236) (actual time=5.782..255.755 rows=4,819 loops=1)

50. 8.897 226.750 ↓ 11.5 4,819 1

Nested Loop (cost=51.79..10,286.13 rows=418 width=228) (actual time=5.771..226.750 rows=4,819 loops=1)

51. 4.556 193.758 ↓ 11.5 4,819 1

Nested Loop (cost=51.70..9,501.27 rows=418 width=220) (actual time=5.760..193.758 rows=4,819 loops=1)

  • Join Filter: (b.fk_intervention = f.fk_intervention)
52. 2.915 172.831 ↓ 12.9 1,819 1

Nested Loop (cost=51.62..9,234.36 rows=141 width=200) (actual time=5.749..172.831 rows=1,819 loops=1)

53. 2.541 160.821 ↓ 3.7 1,819 1

Nested Loop (cost=51.53..8,309.32 rows=492 width=200) (actual time=5.737..160.821 rows=1,819 loops=1)

54. 2.481 149.185 ↓ 38.7 1,819 1

Nested Loop Left Join (cost=51.45..8,221.47 rows=47 width=196) (actual time=5.726..149.185 rows=1,819 loops=1)

55. 2.201 123.057 ↓ 38.7 1,819 1

Nested Loop Left Join (cost=51.36..7,656.21 rows=47 width=197) (actual time=5.708..123.057 rows=1,819 loops=1)

56. 2.857 111.539 ↓ 28.3 1,331 1

Nested Loop Left Join (cost=51.27..7,407.62 rows=47 width=177) (actual time=5.696..111.539 rows=1,331 loops=1)

57. 1.870 104.689 ↓ 28.3 1,331 1

Nested Loop (cost=51.22..7,325.54 rows=47 width=175) (actual time=5.687..104.689 rows=1,331 loops=1)

  • Join Filter: (b.fk_intervention = g2.fk_intervention)
58. 2.716 96.164 ↓ 27.2 1,331 1

Nested Loop (cost=51.13..7,232.64 rows=49 width=167) (actual time=5.678..96.164 rows=1,331 loops=1)

  • Join Filter: (b.fk_intervention = g3.fk_intervention)
59. 2.413 86.443 ↓ 21.9 1,401 1

Nested Loop (cost=51.04..7,111.30 rows=64 width=159) (actual time=5.667..86.443 rows=1,401 loops=1)

  • Join Filter: (b.fk_intervention = g5.fk_intervention)
60. 1.394 74.209 ↓ 16.9 1,403 1

Hash Left Join (cost=50.96..6,953.93 rows=83 width=145) (actual time=5.653..74.209 rows=1,403 loops=1)

  • Hash Cond: (el.fk_option_mission = ek.id_option_mission)
61. 1.953 72.190 ↓ 16.9 1,403 1

Hash Join (cost=32.83..6,935.49 rows=83 width=143) (actual time=5.021..72.190 rows=1,403 loops=1)

  • Hash Cond: (c.fk_mission = e.id_mission)
62. 1.101 69.881 ↓ 14.3 702 1

Nested Loop Left Join (cost=21.36..6,923.76 rows=49 width=125) (actual time=4.656..69.881 rows=702 loops=1)

63. 1.034 67.376 ↓ 14.3 702 1

Nested Loop Left Join (cost=21.30..6,835.95 rows=49 width=121) (actual time=4.649..67.376 rows=702 loops=1)

64. 1.504 62.832 ↓ 14.3 702 1

Nested Loop (cost=21.22..6,744.45 rows=49 width=96) (actual time=4.638..62.832 rows=702 loops=1)

  • Join Filter: (b.fk_intervention = ee.fk_intervention)
65. 0.822 57.818 ↓ 12.8 702 1

Nested Loop Left Join (cost=21.13..6,641.03 rows=55 width=84) (actual time=4.625..57.818 rows=702 loops=1)

66. 1.064 53.486 ↓ 12.8 702 1

Nested Loop Left Join (cost=21.04..6,536.68 rows=55 width=80) (actual time=4.613..53.486 rows=702 loops=1)

67. 3.215 47.508 ↓ 12.8 702 1

Nested Loop Left Join (cost=20.96..6,430.78 rows=55 width=64) (actual time=4.602..47.508 rows=702 loops=1)

68. 0.648 37.273 ↓ 12.8 702 1

Nested Loop (cost=20.87..6,272.71 rows=55 width=64) (actual time=4.581..37.273 rows=702 loops=1)

69. 0.656 33.115 ↓ 6.0 702 1

Nested Loop (cost=20.79..6,054.20 rows=117 width=56) (actual time=4.571..33.115 rows=702 loops=1)

70. 1.269 27.915 ↓ 4.5 1,136 1

Nested Loop (cost=20.70..5,579.39 rows=254 width=44) (actual time=4.553..27.915 rows=1,136 loops=1)

71. 0.520 20.426 ↓ 3.6 1,244 1

Nested Loop (cost=20.61..4,930.77 rows=347 width=36) (actual time=4.536..20.426 rows=1,244 loops=1)

72. 0.014 0.014 ↑ 1.0 1 1

Index Only Scan using idx_calendriers_date on calendriers a (cost=0.06..3.06 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (date = '2018-12-05'::date)
  • Heap Fetches: 1
73. 17.300 19.892 ↓ 2.1 1,244 1

Bitmap Heap Scan on planning_rendezvous b (cost=20.56..4,925.91 rows=600 width=32) (actual time=4.517..19.892 rows=1,244 loops=1)

  • Recheck Cond: (fk_date = a.id_calendrier)
  • Filter: ((date_fin IS NULL) AND (fk_date_type = 3))
  • Rows Removed by Filter: 29537
  • Heap Blocks: exact=4723
74. 2.592 2.592 ↓ 8.5 30,781 1

Bitmap Index Scan on idx_planning_rendezvous_fk_date (cost=0.00..20.53 rows=3,628 width=0) (actual time=2.592..2.592 rows=30,781 loops=1)

  • Index Cond: (fk_date = a.id_calendrier)
75. 6.220 6.220 ↑ 1.0 1 1,244

Index Scan using interventions_pkey on interventions b2 (cost=0.09..1.87 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1,244)

  • Index Cond: (id_intervention = b.fk_intervention)
  • Filter: (fk_groupe = ANY ('{11,50}'::integer[]))
  • Rows Removed by Filter: 0
76. 4.544 4.544 ↑ 1.0 1 1,136

Index Scan using idx_interventions_types_associes_intervention on interventions_types_associes c (cost=0.09..1.87 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=1,136)

  • Index Cond: (fk_intervention = b.fk_intervention)
  • Filter: (fk_mission <> 2)
  • Rows Removed by Filter: 0
77. 3.510 3.510 ↑ 1.0 1 702

Index Scan using idx_interventions_liaisons_liaison on interventions_liaisons b23 (cost=0.08..1.86 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=702)

  • Index Cond: (fk_intervention_liaison = b.fk_intervention)
  • Filter: (fk_type_liaison = 2)
  • Rows Removed by Filter: 0
78. 7.020 7.020 ↓ 0.0 0 702

Index Scan using idx_planning_rendezvous_interv_type on planning_rendezvous ab (cost=0.09..2.87 rows=1 width=8) (actual time=0.008..0.010 rows=0 loops=702)

  • Index Cond: ((fk_date_type = ANY ('{4,5}'::integer[])) AND (fk_intervention = b.fk_intervention))
  • Filter: ((date_fin IS NULL) AND (date_rdv < b.date_rdv))
  • Rows Removed by Filter: 1
79. 4.914 4.914 ↑ 1.0 1 702

Index Scan using idx_planning_rendezvous_horaire_fk_planning_rendezvous on planning_rendezvous_horaire b1 (cost=0.09..1.92 rows=1 width=20) (actual time=0.005..0.007 rows=1 loops=702)

  • Index Cond: (fk_planning_rendezvous = b.id_planning_rendezvous)
  • Filter: (fk_planning_rendezvous_type = 1)
  • Rows Removed by Filter: 2
80. 3.510 3.510 ↓ 0.0 0 702

Index Only Scan using idx_interventions_partenaires_intervparttype on interventions_partenaires ip20 (cost=0.09..1.89 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=702)

  • Index Cond: ((fk_partenaire_type = 20) AND (fk_intervention = b2.id_intervention))
  • Heap Fetches: 254
81. 3.510 3.510 ↑ 1.0 1 702

Index Scan using idx_interventions_preencodage_intervention on interventions_preencodage ee (cost=0.09..1.88 rows=1 width=12) (actual time=0.005..0.005 rows=1 loops=702)

  • Index Cond: (fk_intervention = b2.id_intervention)
82. 3.510 3.510 ↑ 1.0 1 702

Index Scan using idx_ressources_logistiques_fk_intervention_type_associe on ressources_logistiques d (cost=0.08..1.86 rows=1 width=29) (actual time=0.004..0.005 rows=1 loops=702)

  • Index Cond: (fk_intervention_type_associe = c.id_intervention_type_associe)
83. 1.404 1.404 ↓ 0.0 0 702

Index Scan using seq_interventions_missions_options_fk_intervention on interventions_missions_options el (cost=0.06..1.79 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=702)

  • Index Cond: (fk_intervention = b.fk_intervention)
84. 0.077 0.356 ↓ 1.1 357 1

Hash (cost=10.36..10.36 rows=318 width=18) (actual time=0.356..0.356 rows=357 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
85. 0.128 0.279 ↓ 1.1 357 1

Hash Right Join (cost=5.23..10.36 rows=318 width=18) (actual time=0.117..0.279 rows=357 loops=1)

  • Hash Cond: (efe.fk_mission = e.id_mission)
86. 0.050 0.050 ↓ 1.0 326 1

Seq Scan on missions_libelles efe (cost=0.00..4.95 rows=318 width=14) (actual time=0.009..0.050 rows=326 loops=1)

87. 0.039 0.101 ↓ 1.0 193 1

Hash (cost=4.57..4.57 rows=189 width=8) (actual time=0.101..0.101 rows=193 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
88. 0.062 0.062 ↓ 1.0 193 1

Seq Scan on missions e (cost=0.00..4.57 rows=189 width=8) (actual time=0.017..0.062 rows=193 loops=1)

89. 0.178 0.625 ↑ 1.0 974 1

Hash (cost=14.72..14.72 rows=974 width=10) (actual time=0.625..0.625 rows=974 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
90. 0.295 0.447 ↑ 1.0 974 1

Hash Left Join (cost=1.16..14.72 rows=974 width=10) (actual time=0.037..0.447 rows=974 loops=1)

  • Hash Cond: (ek.fk_option_valeur = em.id_option_valeur)
91. 0.134 0.134 ↑ 1.0 974 1

Seq Scan on options_missions ek (cost=0.00..12.92 rows=974 width=8) (actual time=0.013..0.134 rows=974 loops=1)

92. 0.006 0.018 ↑ 1.0 25 1

Hash (cost=1.07..1.07 rows=25 width=10) (actual time=0.018..0.018 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
93. 0.012 0.012 ↑ 1.0 25 1

Seq Scan on options_valeurs em (cost=0.00..1.07 rows=25 width=10) (actual time=0.008..0.012 rows=25 loops=1)

94. 9.821 9.821 ↑ 1.0 1 1,403

Index Scan using idx_interventions_partenaires_intervparttype on interventions_partenaires g5 (cost=0.09..1.89 rows=1 width=14) (actual time=0.006..0.007 rows=1 loops=1,403)

  • Index Cond: ((fk_partenaire_type = 5) AND (fk_intervention = ee.fk_intervention))
95. 7.005 7.005 ↑ 1.0 1 1,401

Index Only Scan using idx_interventions_partenaires_intervparttype on interventions_partenaires g3 (cost=0.09..1.89 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1,401)

  • Index Cond: ((fk_partenaire_type = 3) AND (fk_intervention = ee.fk_intervention))
  • Heap Fetches: 1331
96. 6.655 6.655 ↑ 1.0 1 1,331

Index Only Scan using idx_interventions_partenaires_intervparttype on interventions_partenaires g2 (cost=0.09..1.89 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1,331)

  • Index Cond: ((fk_partenaire_type = 2) AND (fk_intervention = ee.fk_intervention))
  • Heap Fetches: 1331
97. 3.993 3.993 ↑ 1.0 1 1,331

Index Scan using modeles_familles_pkey on modeles_familles t7 (cost=0.06..1.75 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=1,331)

  • Index Cond: (id_modeles_famille = ee.fk_famille)
98. 9.317 9.317 ↑ 2.0 1 1,331

Index Scan using idx_fk_modele_modeles_dimensions on modeles_dimensions ef (cost=0.09..5.28 rows=2 width=24) (actual time=0.005..0.007 rows=1 loops=1,331)

  • Index Cond: (fk_modele = ee.fk_modele)
  • Filter: (date_fin IS NULL)
  • Rows Removed by Filter: 1
99. 23.647 23.647 ↑ 1.0 1 1,819

Index Scan using idx_modeles_classifications_modele on modeles_classifications efu (cost=0.09..12.02 rows=1 width=7) (actual time=0.009..0.013 rows=1 loops=1,819)

  • Index Cond: (fk_modele = ee.fk_modele)
  • Filter: (fk_modele_classification_type = 9)
  • Rows Removed by Filter: 27
100. 9.095 9.095 ↑ 1.0 1 1,819

Index Only Scan using idx_partenaires_contacts_moraux_conteneurs on partenaires_contacts o3 (cost=0.09..1.87 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=1,819)

  • Index Cond: (fk_partenaire_moral = g3.fk_partenaire)
  • Heap Fetches: 1819
101. 9.095 9.095 ↑ 1.0 1 1,819

Index Only Scan using idx_conteneurs_types on conteneurs p3 (cost=0.09..1.88 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1,819)

  • Index Cond: ((fk_type = 6) AND (id_conteneur = o3.fk_conteneur_contact))
  • Heap Fetches: 1819
102. 16.371 16.371 ↑ 1.0 3 1,819

Index Scan using idx_flux_interventions_intervention on flux_interventions f (cost=0.09..1.88 rows=3 width=20) (actual time=0.005..0.009 rows=3 loops=1,819)

  • Index Cond: (fk_intervention = g2.fk_intervention)
  • Filter: (fk_flux_noeud_type = ANY ('{1,2}'::integer[]))
103. 24.095 24.095 ↑ 1.0 1 4,819

Index Scan using conteneurs_pkey on conteneurs hh (cost=0.09..1.88 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=4,819)

  • Index Cond: (id_conteneur = f.fk_conteneur_de)
104. 24.095 24.095 ↑ 1.0 1 4,819

Index Scan using idx_partenaires_contacts_conteneur_contact on partenaires_contacts h (cost=0.09..1.87 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=4,819)

  • Index Cond: (fk_conteneur_contact = hh.id_conteneur)
105. 19.276 19.276 ↑ 1.0 1 4,819

Index Scan using idx_partenaires_contacts_adresses on partenaires_contacts_adresses j (cost=0.09..1.87 rows=1 width=70) (actual time=0.004..0.004 rows=1 loops=4,819)

  • Index Cond: (fk_partenaire_contact = h.id_partenaire_contact)
106. 19.276 19.276 ↑ 1.0 1 4,819

Index Scan using partenaires_moraux_pkey on partenaires_moraux k (cost=0.09..1.87 rows=1 width=22) (actual time=0.004..0.004 rows=1 loops=4,819)

  • Index Cond: (id_partenaire_moral = h.fk_partenaire_moral)
107. 9.638 9.638 ↑ 1.0 1 4,819

Index Scan using codes_postaux_pkey on codes_postaux l (cost=0.06..1.83 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=4,819)

  • Index Cond: (id_code_postal = j.fk_code_postal)
108. 19.276 19.276 ↑ 1.0 1 4,819

Index Scan using conteneurs_pkey on conteneurs hh2 (cost=0.09..1.88 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=4,819)

  • Index Cond: (id_conteneur = f.fk_conteneur_a)
109. 19.276 19.276 ↑ 1.0 1 4,819

Index Scan using idx_partenaires_contacts_conteneur_contact on partenaires_contacts h2 (cost=0.09..1.87 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=4,819)

  • Index Cond: (fk_conteneur_contact = hh2.id_conteneur)
110. 0.000 0.000 ↑ 8.0 1 4,819

Materialize (cost=0.00..1.03 rows=8 width=7) (actual time=0.000..0.000 rows=1 loops=4,819)

111. 0.009 0.009 ↑ 8.0 1 1

Seq Scan on pays m (cost=0.00..1.02 rows=8 width=7) (actual time=0.009..0.009 rows=1 loops=1)

112. 9.638 9.638 ↓ 0.0 0 4,819

Index Only Scan using partenaires_physiques_langues_pkey on partenaires_physiques_langues n (cost=0.09..1.87 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=4,819)

  • Index Cond: (fk_partenaire_physique = h.fk_partenaire_physique)
  • Heap Fetches: 832
113. 19.276 19.276 ↑ 1.0 1 4,819

Index Scan using idx_partenaires_contacts_adresses on partenaires_contacts_adresses j2 (cost=0.09..1.87 rows=1 width=70) (actual time=0.004..0.004 rows=1 loops=4,819)

  • Index Cond: (fk_partenaire_contact = h2.id_partenaire_contact)
114. 14.457 14.457 ↑ 1.0 1 4,819

Index Scan using partenaires_moraux_pkey on partenaires_moraux k2 (cost=0.09..1.87 rows=1 width=22) (actual time=0.003..0.003 rows=1 loops=4,819)

  • Index Cond: (id_partenaire_moral = h2.fk_partenaire_moral)
115. 9.638 9.638 ↑ 1.0 1 4,819

Index Scan using codes_postaux_pkey on codes_postaux l2 (cost=0.06..1.83 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=4,819)

  • Index Cond: (id_code_postal = j2.fk_code_postal)
116. 28.914 28.914 ↓ 0.0 0 4,819

Index Scan using idx_interventions_statuts_interventions on interventions_statuts xs (cost=0.09..2.22 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=4,819)

  • Index Cond: (fk_intervention = b.fk_intervention)
  • Filter: ((fk_evenement = ANY ('{6,69,1002}'::integer[])) OR ((fk_evenement = 318) AND (fin_statut IS NULL)))
  • Rows Removed by Filter: 3
117. 0.000 0.000 ↑ 8.0 1 4,705

Materialize (cost=0.00..1.03 rows=8 width=7) (actual time=0.000..0.000 rows=1 loops=4,705)

118. 0.005 0.005 ↑ 8.0 1 1

Seq Scan on pays m2 (cost=0.00..1.02 rows=8 width=7) (actual time=0.005..0.005 rows=1 loops=1)

119. 4.705 4.705 ↓ 0.0 0 4,705

Index Only Scan using partenaires_physiques_langues_pkey on partenaires_physiques_langues n2 (cost=0.09..1.87 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=4,705)

  • Index Cond: (fk_partenaire_physique = h2.fk_partenaire_physique)
  • Heap Fetches: 578
120. 14.115 14.115 ↓ 0.0 0 4,705

Index Scan using idx_interventions_liaisons_interventions on interventions_liaisons xk_1 (cost=0.08..1.87 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=4,705)

  • Index Cond: ((fk_type_liaison = 14) AND (fk_intervention = b.fk_intervention))
121. 18.820 18.820 ↓ 0.0 0 4,705

Index Scan using idx_interventions_partenaires_interventions on interventions_partenaires xt (cost=0.09..1.89 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=4,705)

  • Index Cond: ((fk_intervention = b.fk_intervention) AND (fk_partenaire = 507729))
  • Filter: (fk_partenaire_type = 2)
122. 9.410 9.410 ↓ 0.0 0 4,705

Index Scan using idx_planning_ortec_order_fk_intervention on planning_ortec_order xu (cost=0.06..1.76 rows=1 width=17) (actual time=0.002..0.002 rows=0 loops=4,705)

  • Index Cond: (fk_intervention = b.fk_intervention)
  • Filter: (date_fin IS NULL)
123. 28.230 28.230 ↑ 2.0 1 4,705

Index Scan using idx_planning_rendezvous_interv_type on planning_rendezvous xv (cost=0.09..2.76 rows=2 width=16) (actual time=0.005..0.006 rows=1 loops=4,705)

  • Index Cond: ((fk_date_type = 3) AND (fk_intervention = b.fk_intervention))
  • Filter: (date_fin IS NULL)
  • Rows Removed by Filter: 0
124. 4.696 4.705 ↑ 1.0 1 4,705

Materialize (cost=0.06..3.06 rows=1 width=8) (actual time=0.000..0.001 rows=1 loops=4,705)

125. 0.009 0.009 ↑ 1.0 1 1

Index Scan using idx_planning_agenda_donneur_ordre_date on planning_agenda_donneur_ordre t1 (cost=0.06..3.06 rows=1 width=8) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (date_agenda = '2018-12-05'::date)
  • Filter: realise
126. 23.525 23.525 ↑ 16.0 1 4,705

Index Scan using idx_planning_agenda_partenaire on planning_agenda t2 (cost=0.09..10.52 rows=16 width=12) (actual time=0.004..0.005 rows=1 loops=4,705)

  • Index Cond: (id_partenaire = g3.fk_partenaire)
127. 18.820 18.820 ↑ 1.0 1 4,705

Index Scan using idx_planning_agenda_horaire_fk_planning_agenda on planning_agenda_horaire t3 (cost=0.08..1.86 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=4,705)

  • Index Cond: (fk_planning_agenda = t2.id_planning_agenda)
128. 23.525 23.525 ↑ 1.0 1 4,705

Index Scan using idx_planning_tournee_planning_agenda on planning_tournee t4 (cost=0.09..1.87 rows=1 width=24) (actual time=0.004..0.005 rows=1 loops=4,705)

  • Index Cond: (fk_planning_agenda = t2.id_planning_agenda)
129. 0.055 0.122 ↑ 1.0 276 1

Hash (cost=4.83..4.83 rows=276 width=10) (actual time=0.122..0.122 rows=276 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
130. 0.067 0.067 ↑ 1.0 276 1

Seq Scan on planning_tournee_driver t5 (cost=0.00..4.83 rows=276 width=10) (actual time=0.011..0.067 rows=276 loops=1)

131. 23.525 23.525 ↑ 1.0 1 4,705

Index Scan using idx_conteneurs_interventions on conteneurs tu (cost=0.09..1.88 rows=1 width=12) (actual time=0.004..0.005 rows=1 loops=4,705)

  • Index Cond: (fk_intervention = f.fk_intervention)
132. 32.949 32.949 ↓ 1.5 3 4,707

Index Scan using idx_conteneurs_est_dans_fk_conteneur on conteneurs_est_dans tu1 (cost=0.09..2.36 rows=2 width=12) (actual time=0.004..0.007 rows=3 loops=4,707)

  • Index Cond: (fk_conteneur = tu.id_conteneur)
133. 67.665 67.665 ↑ 1.0 1 13,533

Index Scan using conteneurs_pkey on conteneurs tu4 (cost=0.09..1.88 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=13,533)

  • Index Cond: (id_conteneur = tu1.fk_dans_conteneur)
134. 40.599 40.599 ↓ 0.0 0 13,533

Index Scan using idx_conteneurs_statuts_evenements_open2 on conteneurs_statuts tu2 (cost=0.06..1.84 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=13,533)

  • Index Cond: ((fk_conteneur = tu.id_conteneur) AND (fk_evenement = 63))
135. 81.198 81.198 ↓ 0.0 0 13,533

Index Scan using idx_flux_interventions_intervention on flux_interventions tu3 (cost=0.09..1.89 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=13,533)

  • Index Cond: (fk_intervention = b.fk_intervention)
  • Filter: ((date_fin IS NULL) AND (fk_flux_noeud_type = 1) AND ("position" = 1))
  • Rows Removed by Filter: 3
136.          

SubPlan (forNested Loop Left Join)

137. 40.599 378.924 ↑ 1.0 1 13,533

Aggregate (cost=14.14..14.14 rows=1 width=32) (actual time=0.028..0.028 rows=1 loops=13,533)

138. 31.358 338.325 ↑ 1.0 1 13,533

Nested Loop (cost=0.34..14.14 rows=1 width=9) (actual time=0.023..0.025 rows=1 loops=13,533)

139. 12.465 257.127 ↑ 1.0 1 13,533

Nested Loop (cost=0.26..9.59 rows=1 width=13) (actual time=0.018..0.019 rows=1 loops=13,533)

140. 25.998 189.462 ↑ 2.0 1 13,533

Nested Loop (cost=0.17..9.39 rows=2 width=17) (actual time=0.012..0.014 rows=1 loops=13,533)

141. 108.264 108.264 ↑ 2.0 1 13,533

Index Scan using lignes_financieres_idx7 on lignes_financieres za (cost=0.09..3.21 rows=2 width=17) (actual time=0.007..0.008 rows=1 loops=13,533)

  • Index Cond: (fk_intervention = b.fk_intervention)
  • Filter: (fk_partenaire_de = 8146)
  • Rows Removed by Filter: 2
142. 55.200 55.200 ↑ 1.0 1 13,800

Index Scan using lignes_financieres_documents_idx on lignes_financieres_documents wa (cost=0.09..3.09 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=13,800)

  • Index Cond: (fk_ligne = za.id_ligne)
143. 55.200 55.200 ↑ 1.0 1 13,800

Index Scan using documents_financier_pk on documents_financier va (cost=0.09..0.10 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=13,800)

  • Index Cond: (id_document_financier = wa.fk_document_financier)
  • Filter: (fk_type = 15)
  • Rows Removed by Filter: 0
144. 49.840 49.840 ↑ 1.0 1 9,968

Index Scan using idx_planning_rendezvous_interv_type on planning_rendezvous wk (cost=0.09..4.54 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=9,968)

  • Index Cond: ((fk_date_type = 3) AND (fk_intervention = b.fk_intervention))
  • Filter: ((date_fin IS NULL) AND (fk_date = a.id_calendrier))
  • Rows Removed by Filter: 0
145. 0.000 243.594 ↓ 0.0 0 13,533

Nested Loop (cost=0.26..13.69 rows=1 width=0) (actual time=0.018..0.018 rows=0 loops=13,533)

146. 20.514 243.594 ↓ 0.0 0 13,533

Nested Loop (cost=0.17..9.37 rows=1 width=8) (actual time=0.018..0.018 rows=0 loops=13,533)

147. 81.198 81.198 ↓ 1.5 3 13,533

Index Scan using idx_interventions_liaisons_intervention on interventions_liaisons ya (cost=0.08..3.18 rows=2 width=4) (actual time=0.005..0.006 rows=3 loops=13,533)

  • Index Cond: (fk_intervention = b23.fk_intervention)
  • Filter: (fk_type_liaison = 2)
148. 141.882 141.882 ↓ 0.0 0 47,294

Index Only Scan using idx_interventions_types_associes_intervention on interventions_types_associes yb (cost=0.09..3.09 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=47,294)

  • Index Cond: ((fk_intervention = ya.fk_intervention_liaison) AND (fk_mission = 25))
  • Heap Fetches: 36
149. 0.216 0.216 ↑ 1.0 1 36

Index Scan using idx_planning_rendezvous_interv_type on planning_rendezvous yc (cost=0.09..4.32 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=36)

  • Index Cond: ((fk_date_type = 3) AND (fk_intervention = yb.fk_intervention))
  • Filter: (((date_fin IS NULL) OR (date_fin >= a.date)) AND (fk_date = a.id_calendrier))
  • Rows Removed by Filter: 1
150.          

SubPlan (forSubquery Scan)

151. 0.207 3.519 ↑ 1.0 1 207

Limit (cost=9.37..9.37 rows=1 width=8) (actual time=0.016..0.017 rows=1 loops=207)

152. 0.414 3.312 ↑ 1.0 1 207

Aggregate (cost=9.37..9.37 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=207)

153. 0.528 2.898 ↓ 0.0 0 207

Nested Loop (cost=0.17..9.37 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=207)

154. 1.035 1.035 ↑ 1.0 2 207

Index Scan using idx_interventions_liaisons_intervention on interventions_liaisons il1 (cost=0.09..3.18 rows=2 width=4) (actual time=0.004..0.005 rows=2 loops=207)

  • Index Cond: (fk_intervention = (pp.fk_intervention_maitre)::integer)
  • Filter: (fk_type_liaison = 2)
155. 1.335 1.335 ↓ 0.0 0 445

Index Only Scan using idx_interventions_types_associes_intervention on interventions_types_associes il2 (cost=0.09..3.09 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=445)

  • Index Cond: ((fk_intervention = il1.fk_intervention_liaison) AND (fk_mission = 2))
  • Heap Fetches: 0
156. 0.207 3.519 ↑ 1.0 1 207

Limit (cost=9.38..9.38 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=207)

157. 0.207 3.312 ↑ 1.0 1 207

Aggregate (cost=9.38..9.38 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=207)

158. 0.642 3.105 ↑ 1.0 1 207

Nested Loop (cost=0.17..9.38 rows=1 width=0) (actual time=0.012..0.015 rows=1 loops=207)

159. 1.035 1.035 ↑ 2.0 1 207

Index Scan using idx_interventions_liaisons_intervention on interventions_liaisons il11 (cost=0.09..3.19 rows=2 width=4) (actual time=0.004..0.005 rows=1 loops=207)

  • Index Cond: (fk_intervention = (pp.fk_intervention_maitre)::integer)
  • Filter: ((fk_type_liaison = 2) AND (fk_intervention_liaison <> (pp.fk_intervention)::integer))
  • Rows Removed by Filter: 1
160. 1.428 1.428 ↑ 1.0 1 238

Index Scan using idx_planning_rendezvous_rdv_interv on planning_rendezvous il22 (cost=0.09..3.09 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=238)

  • Index Cond: ((fk_date_type = 3) AND (date_rdv = pp.drdv) AND (fk_intervention = il11.fk_intervention_liaison))
  • Filter: (date_fin IS NULL)
  • Rows Removed by Filter: 0
161. 2.580 2.580 ↓ 0.0 0 645

Index Scan using idx_interventions_actions_interv_event on interventions_actions xw (cost=0.09..3.09 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=645)

  • Index Cond: ((fk_evenement = 850) AND (fk_intervention = (pp.fk_intervention)::integer))
  • Filter: ((debut_action > pp.creation_time_drdv) AND ((debut_action)::date < pp.drdv))
  • Rows Removed by Filter: 0
162. 1.290 1.290 ↓ 0.0 0 645

Index Scan using idx_planning_agenda_donneur_ordre_date on planning_agenda_donneur_ordre tt1 (cost=0.06..3.06 rows=1 width=8) (actual time=0.001..0.002 rows=0 loops=645)

  • Index Cond: (date_agenda = pp.dprepa)
  • Filter: realise
163. 105.135 105.135 ↑ 1.3 461 645

Index Scan using idx_planning_agenda_donneur_ordre on planning_agenda tt2 (cost=0.09..13.54 rows=619 width=12) (actual time=0.002..0.163 rows=461 loops=645)

  • Index Cond: (fk_donneur_ordre = tt1.id_planning_agenda_donneur_ordre)
164.          

SubPlan (forNested Loop Left Join)

165. 595.052 595.052 ↑ 1.0 1 297,526

Index Only Scan using idx_partenaires_contacts_conteneur_contact on partenaires_contacts (cost=0.09..3.09 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=297,526)

  • Index Cond: (fk_conteneur_contact = pp.fk_conteneur_flux_de)
  • Heap Fetches: 254458
166. 3.164 3.164 ↓ 0.0 0 1,582

Index Only Scan using idx_planning_agenda_horaire_fk_planning_agenda on planning_agenda_horaire tt3 (cost=0.08..0.09 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1,582)

  • Index Cond: (fk_planning_agenda = tt2.id_planning_agenda)
  • Heap Fetches: 1
167. 3.164 3.164 ↑ 1.0 1 1,582

Index Only Scan using idx_planning_tournee_planning_agenda on planning_tournee tt4 (cost=0.09..0.12 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,582)

  • Index Cond: (fk_planning_agenda = tt2.id_planning_agenda)
  • Heap Fetches: 945
168. 0.059 0.171 ↑ 1.0 276 1

Hash (cost=4.83..4.83 rows=276 width=12) (actual time=0.171..0.171 rows=276 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
169. 0.112 0.112 ↑ 1.0 276 1

Seq Scan on planning_tournee_driver tt5 (cost=0.00..4.83 rows=276 width=12) (actual time=0.021..0.112 rows=276 loops=1)

170.          

SubPlan (forHash Left Join)

171. 1.582 28.476 ↓ 0.0 0 1,582

Limit (cost=0.26..9.95 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=1,582)

172. 0.000 26.894 ↓ 0.0 0 1,582

Nested Loop (cost=0.26..9.95 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=1,582)

173. 2.966 26.894 ↓ 0.0 0 1,582

Nested Loop (cost=0.17..9.36 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=1,582)

174. 9.492 9.492 ↓ 1.5 3 1,582

Index Scan using idx_interventions_liaisons_intervention on interventions_liaisons yaa (cost=0.09..3.18 rows=2 width=4) (actual time=0.004..0.006 rows=3 loops=1,582)

  • Index Cond: (fk_intervention = (pp.fk_intervention_maitre)::integer)
  • Filter: (fk_type_liaison = 2)
175. 14.436 14.436 ↓ 0.0 0 4,812

Index Scan using idx_interventions_types_entrees_interventions on interventions_types_entrees ybb (cost=0.09..3.09 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=4,812)

  • Index Cond: (fk_intervention = yaa.fk_intervention_liaison)
  • Filter: (fk_type = 35)
  • Rows Removed by Filter: 1
176. 0.108 0.108 ↑ 1.0 1 27

Index Scan using idx_fk_intervention_financier_statuts on financier_statuts ycc (cost=0.08..0.58 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=27)

  • Index Cond: (fk_intervention = ybb.fk_intervention)
  • Filter: ((fk_evenement = 249) AND ((fin_statut IS NULL) OR ((fin_statut)::date = pp.drdv)))
177. 0.044 15.521 ↓ 27.0 27 1

Subquery Scan on *SELECT* 2 (cost=416.37..416.37 rows=1 width=1,766) (actual time=15.454..15.521 rows=27 loops=1)

178. 0.024 15.477 ↓ 27.0 27 1

Unique (cost=416.37..416.37 rows=1 width=1,766) (actual time=15.449..15.477 rows=27 loops=1)

179. 0.184 15.453 ↓ 55.0 55 1

Sort (cost=416.37..416.37 rows=1 width=1,766) (actual time=15.448..15.453 rows=55 loops=1)

  • Sort Key: c_1.id_partenaire_moral
  • Sort Method: quicksort Memory: 53kB
180. 0.756 15.269 ↓ 55.0 55 1

Nested Loop Left Join (cost=6.58..416.37 rows=1 width=1,766) (actual time=0.357..15.269 rows=55 loops=1)

181. 0.082 14.348 ↓ 55.0 55 1

Nested Loop (cost=6.53..416.29 rows=1 width=147) (actual time=0.313..14.348 rows=55 loops=1)

182. 0.065 14.046 ↓ 55.0 55 1

Nested Loop (cost=6.44..416.17 rows=1 width=137) (actual time=0.302..14.046 rows=55 loops=1)

183. 0.093 13.761 ↓ 55.0 55 1

Nested Loop (cost=6.35..414.83 rows=1 width=137) (actual time=0.293..13.761 rows=55 loops=1)

  • Join Filter: (c_1.id_partenaire_moral = g.fk_partenaire)
184. 0.062 13.503 ↓ 55.0 55 1

Nested Loop (cost=6.30..414.76 rows=1 width=141) (actual time=0.283..13.503 rows=55 loops=1)

185. 0.091 13.331 ↓ 55.0 55 1

Nested Loop Left Join (cost=6.27..414.73 rows=1 width=142) (actual time=0.274..13.331 rows=55 loops=1)

186. 0.000 13.075 ↓ 55.0 55 1

Nested Loop (cost=6.21..414.67 rows=1 width=127) (actual time=0.262..13.075 rows=55 loops=1)

187. 1.010 5.846 ↓ 2,449.0 2,449 1

Nested Loop (cost=6.13..414.54 rows=1 width=70) (actual time=0.250..5.846 rows=2,449 loops=1)

  • Join Filter: CASE WHEN (b_1.fk_partenaire_contact IS NOT NULL) THEN (cd.id_partenaire_contact = b_1.fk_partenaire_contact) ELSE true END
  • Rows Removed by Join Filter: 460
188. 0.044 2.581 ↓ 55.0 55 1

Nested Loop Left Join (cost=6.04..412.45 rows=1 width=66) (actual time=0.235..2.581 rows=55 loops=1)

189. 0.270 2.262 ↓ 55.0 55 1

Nested Loop (cost=5.96..409.45 rows=1 width=62) (actual time=0.222..2.262 rows=55 loops=1)

190. 0.134 1.365 ↓ 1.9 209 1

Hash Join (cost=5.87..82.17 rows=109 width=32) (actual time=0.203..1.365 rows=209 loops=1)

  • Hash Cond: (b_1.fk_planning_tournee_driver = a_1.id_planning_driver)
191. 1.087 1.087 ↑ 1.1 345 1

Seq Scan on planning_ortec_ressource_config b_1 (cost=0.00..76.11 rows=371 width=32) (actual time=0.046..1.087 rows=345 loops=1)

  • Filter: ((date_fin IS NULL) AND (jour = 3))
  • Rows Removed by Filter: 3685
192. 0.021 0.144 ↓ 1.2 99 1

Hash (cost=5.59..5.59 rows=81 width=4) (actual time=0.144..0.144 rows=99 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
193. 0.123 0.123 ↓ 1.2 99 1

Seq Scan on planning_tournee_driver a_1 (cost=0.00..5.59 rows=81 width=4) (actual time=0.013..0.123 rows=99 loops=1)

  • Filter: (est_attribue AND (fk_type = ANY ('{1,2}'::integer[])) AND (fk_societe <> ALL ('{469301,469299,491494,528754}'::integer[])) AND (fk_depot <> ALL ('{39,290794,1578330,2307869,2307884}'::integer[])))
  • Rows Removed by Filter: 177
194. 0.627 0.627 ↓ 0.0 0 209

Index Scan using idx_partenaires_moraux_types on partenaires_moraux c_1 (cost=0.09..3.00 rows=1 width=30) (actual time=0.003..0.003 rows=0 loops=209)

  • Index Cond: ((fk_type = 2) AND (id_partenaire_moral = b_1.fk_partenaire_moral))
  • Filter: (id_partenaire_moral <> ALL ('{461630,376536,376546,557174}'::integer[]))
  • Rows Removed by Filter: 0
195. 0.275 0.275 ↑ 1.0 1 55

Index Only Scan using partenaires_groupes_entrees_pkey on partenaires_groupes_entrees cc (cost=0.09..2.99 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=55)

  • Index Cond: (fk_partenaire_moral = b_1.fk_partenaire_moral)
  • Heap Fetches: 55
196. 2.255 2.255 ↓ 53.0 53 55

Index Scan using idx_partenaires_contacts_moraux_conteneurs on partenaires_contacts cd (cost=0.09..2.09 rows=1 width=8) (actual time=0.006..0.041 rows=53 loops=55)

  • Index Cond: (fk_partenaire_moral = c_1.id_partenaire_moral)
197. 7.347 7.347 ↓ 0.0 0 2,449

Index Scan using idx_partenaires_contacts_adresses on partenaires_contacts_adresses d_1 (cost=0.09..0.12 rows=1 width=65) (actual time=0.003..0.003 rows=0 loops=2,449)

  • Index Cond: (fk_partenaire_contact = cd.id_partenaire_contact)
198. 0.165 0.165 ↑ 1.0 1 55

Index Scan using codes_postaux_pkey on codes_postaux e_1 (cost=0.06..0.06 rows=1 width=23) (actual time=0.003..0.003 rows=1 loops=55)

  • Index Cond: (id_code_postal = d_1.fk_code_postal)
199. 0.110 0.110 ↑ 1.0 1 55

Index Scan using pays_pkey on pays f_1 (cost=0.03..0.03 rows=1 width=7) (actual time=0.002..0.002 rows=1 loops=55)

  • Index Cond: (id_pays = d_1.fk_pays)
200. 0.165 0.165 ↑ 1.0 1 55

Index Scan using idx_planning_partenaires_depots_liens_fk_partenaire on planning_partenaires_depots_liens g (cost=0.06..0.06 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=55)

  • Index Cond: (fk_partenaire = cd.fk_partenaire_moral)
201. 0.220 0.220 ↑ 1.0 1 55

Index Scan using idx_partenaires_contacts_conteneur_contact on partenaires_contacts h_1 (cost=0.09..1.34 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=55)

  • Index Cond: (fk_conteneur_contact = g.fk_conteneur_depot)
202. 0.220 0.220 ↑ 1.0 1 55

Index Scan using idx_partenaires_contacts_adresses on partenaires_contacts_adresses i (cost=0.09..0.12 rows=1 width=18) (actual time=0.003..0.004 rows=1 loops=55)

  • Index Cond: (fk_partenaire_contact = h_1.id_partenaire_contact)
203. 0.165 0.165 ↑ 1.0 1 55

Index Scan using codes_postaux_pkey on codes_postaux j_1 (cost=0.06..0.06 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=55)

  • Index Cond: (id_code_postal = i.fk_code_postal)
204. 7.330 7.392 ↑ 1.0 24 672

Materialize (cost=0.00..4.36 rows=24 width=205,134) (actual time=0.000..0.011 rows=24 loops=672)

205. 0.062 0.062 ↑ 1.0 24 1

Seq Scan on planning_calendriers_zones_geometries xk (cost=0.00..4.33 rows=24 width=205,134) (actual time=0.015..0.062 rows=24 loops=1)

  • Filter: (date_fin IS NULL)
  • Rows Removed by Filter: 87
206. 0.006 0.025 ↓ 17.0 17 1

Hash (cost=3.13..3.13 rows=1 width=9) (actual time=0.025..0.025 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
207. 0.019 0.019 ↓ 17.0 17 1

Index Scan using idx_planning_calendrier_zones_fk_type on planning_calendrier_zones xl (cost=0.06..3.13 rows=1 width=9) (actual time=0.012..0.019 rows=17 loops=1)

  • Index Cond: (fk_type = 1)
  • Filter: est_active