explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e3aN

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=6,406,290,481,770.04..470,354,568,985,373,312.00 rows=23,517,408 width=800) (actual rows= loops=)

  • Hash Cond: (dmc_concedant_ccd.ccd_simba2_id = dmc_concedant_dept_cde.ccd_id)
2.          

CTE multiville

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=6,406,275,975,404.35..6,406,276,007,176.14 rows=231,068 width=70) (actual rows= loops=)

  • Group Key: nb_ville.dlp_pjt_numero, nb_ville.hmc_type_historique, nb_ville.dlp_multiville
4. 0.000 0.000 ↓ 0.0

Sort (cost=6,406,275,975,404.35..6,406,275,981,181.04 rows=2,310,675 width=46) (actual rows= loops=)

  • Sort Key: nb_ville.dlp_pjt_numero, nb_ville.hmc_type_historique, nb_ville.dlp_multiville
5. 0.000 0.000 ↓ 0.0

Subquery Scan on nb_ville (cost=1,631,708.23..6,406,275,731,167.36 rows=2,310,675 width=46) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,631,708.23..6,406,275,708,060.61 rows=2,310,675 width=58) (actual rows= loops=)

  • Group Key: dlp_3.dlp_pjt_numero, hmc_4.hmc_type_historique, vaa_3.agglo_produit
7. 0.000 0.000 ↓ 0.0

Sort (cost=1,631,708.23..1,637,484.92 rows=2,310,675 width=18) (actual rows= loops=)

  • Sort Key: dlp_3.dlp_pjt_numero, hmc_4.hmc_type_historique, vaa_3.agglo_produit
8. 0.000 0.000 ↓ 0.0

Gather (cost=94,890.61..1,387,471.24 rows=2,310,675 width=18) (actual rows= loops=)

  • Workers Planned: 4
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=93,890.61..1,155,403.74 rows=577,669 width=18) (actual rows= loops=)

  • Hash Cond: (hmc_4.dlp_detail_ligne_projet_id = dlp_3.dlp_dmc_id)
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=22,069.89..1,082,066.62 rows=577,669 width=18) (actual rows= loops=)

  • Hash Cond: ((hmc_4.pve_produit_version_elementaire_id = vaa_3.pve_dmc_id) AND (hmc_4.ccd_concedant_id = vaa_3.ccd_dmc_id))
11. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,501.79..1,064,929.42 rows=1,632,203 width=18) (actual rows= loops=)

  • Hash Cond: (hmc_4.pve_produit_version_elementaire_id = pve_1_2.pve_dmc_id)
12. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on dmc_historique_montant_commerciaux_hmc hmc_4 (cost=0.00..1,036,101.56 rows=5,838,353 width=14) (actual rows= loops=)

  • Filter: ((NOT hmc_histo) AND (hmc_pourcentage_ventilation_portefeuille <> 0.0) AND ((hmc_type_ventilation_initiale)::text = 'ACHAT'::text))
13. 0.000 0.000 ↓ 0.0

Hash (cost=12,916.95..12,916.95 rows=46,787 width=4) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_elementaire_pve pve_1_2 (cost=0.00..12,916.95 rows=46,787 width=4) (actual rows= loops=)

  • Filter: ((pve_pdv_univers)::text = 'BUS'::text)
15. 0.000 0.000 ↓ 0.0

Hash (cost=5,135.44..5,135.44 rows=228,844 width=20) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_var_agglo_vaa vaa_3 (cost=0.00..5,135.44 rows=228,844 width=20) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=64,584.21..64,584.21 rows=578,921 width=8) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp dlp_3 (cost=0.00..64,584.21 rows=578,921 width=8) (actual rows= loops=)

19.          

SubPlan (for GroupAggregate)

20. 0.000 0.000 ↓ 0.0

Result (cost=2,772,468.36..2,772,468.88 rows=26 width=4) (actual rows= loops=)

  • One-Time Filter: (hashed SubPlan 2)
21.          

CTE projet_mv

22. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=89,101.72..1,386,232.56 rows=26 width=12) (actual rows= loops=)

  • Group Key: dlp_1_1.dlp_pjt_numero
  • Filter: (count(DISTINCT vaa_1.agglo_produit) > 1)
23. 0.000 0.000 ↓ 0.0

Hash Join (cost=89,101.72..1,386,231.52 rows=104 width=16) (actual rows= loops=)

  • Hash Cond: (hmc_2.dlp_detail_ligne_projet_id = dlp_1_1.dlp_dmc_id)
24. 0.000 0.000 ↓ 0.0

Gather (cost=23,069.89..1,314,134.12 rows=2,310,675 width=16) (actual rows= loops=)

  • Workers Planned: 4
25. 0.000 0.000 ↓ 0.0

Hash Join (cost=22,069.89..1,082,066.62 rows=577,669 width=16) (actual rows= loops=)

  • Hash Cond: ((hmc_2.pve_produit_version_elementaire_id = vaa_1.pve_dmc_id) AND (hmc_2.ccd_concedant_id = vaa_1.ccd_dmc_id))
26. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,501.79..1,064,929.42 rows=1,632,203 width=16) (actual rows= loops=)

  • Hash Cond: (hmc_2.pve_produit_version_elementaire_id = pve_1.pve_dmc_id)
27. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on dmc_historique_montant_commerciaux_hmc hmc_2 (cost=0.00..1,036,101.56 rows=5,838,353 width=12) (actual rows= loops=)

  • Filter: ((NOT hmc_histo) AND (hmc_pourcentage_ventilation_portefeuille <> 0.0) AND ((hmc_type_ventilation_initiale)::text = 'ACHAT'::text))
28. 0.000 0.000 ↓ 0.0

Hash (cost=12,916.95..12,916.95 rows=46,787 width=4) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_elementaire_pve pve_1 (cost=0.00..12,916.95 rows=46,787 width=4) (actual rows= loops=)

  • Filter: ((pve_pdv_univers)::text = 'BUS'::text)
30. 0.000 0.000 ↓ 0.0

Hash (cost=5,135.44..5,135.44 rows=228,844 width=20) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_var_agglo_vaa vaa_1 (cost=0.00..5,135.44 rows=228,844 width=20) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=66,031.51..66,031.51 rows=26 width=8) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp dlp_1_1 (cost=0.00..66,031.51 rows=26 width=8) (actual rows= loops=)

  • Filter: (dlp_pjt_numero = dlp_3.dlp_pjt_numero)
34. 0.000 0.000 ↓ 0.0

CTE Scan on projet_mv (cost=2,772,468.36..2,772,468.88 rows=26 width=4) (actual rows= loops=)

35.          

SubPlan (for Result)

36. 0.000 0.000 ↓ 0.0

Unique (cost=1,386,235.01..1,386,235.53 rows=104 width=12) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Sort (cost=1,386,235.01..1,386,235.27 rows=104 width=12) (actual rows= loops=)

  • Sort Key: vaa_2.agglo_produit
38. 0.000 0.000 ↓ 0.0

Hash Join (cost=89,101.72..1,386,231.52 rows=104 width=12) (actual rows= loops=)

  • Hash Cond: (hmc_3.dlp_detail_ligne_projet_id = dlp_2.dlp_dmc_id)
39. 0.000 0.000 ↓ 0.0

Gather (cost=23,069.89..1,314,134.12 rows=2,310,675 width=16) (actual rows= loops=)

  • Workers Planned: 4
40. 0.000 0.000 ↓ 0.0

Hash Join (cost=22,069.89..1,082,066.62 rows=577,669 width=16) (actual rows= loops=)

  • Hash Cond: ((hmc_3.pve_produit_version_elementaire_id = vaa_2.pve_dmc_id) AND (hmc_3.ccd_concedant_id = vaa_2.ccd_dmc_id))
41. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,501.79..1,064,929.42 rows=1,632,203 width=16) (actual rows= loops=)

  • Hash Cond: (hmc_3.pve_produit_version_elementaire_id = pve_1_1.pve_dmc_id)
42. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on dmc_historique_montant_commerciaux_hmc hmc_3 (cost=0.00..1,036,101.56 rows=5,838,353 width=12) (actual rows= loops=)

  • Filter: ((NOT hmc_histo) AND (hmc_pourcentage_ventilation_portefeuille <> 0.0) AND ((hmc_type_ventilation_initiale)::text = 'ACHAT'::text))
43. 0.000 0.000 ↓ 0.0

Hash (cost=12,916.95..12,916.95 rows=46,787 width=4) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_elementaire_pve pve_1_1 (cost=0.00..12,916.95 rows=46,787 width=4) (actual rows= loops=)

  • Filter: ((pve_pdv_univers)::text = 'BUS'::text)
45. 0.000 0.000 ↓ 0.0

Hash (cost=5,135.44..5,135.44 rows=228,844 width=20) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_var_agglo_vaa vaa_2 (cost=0.00..5,135.44 rows=228,844 width=20) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash (cost=66,031.51..66,031.51 rows=26 width=4) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp dlp_2 (cost=0.00..66,031.51 rows=26 width=4) (actual rows= loops=)

  • Filter: (dlp_pjt_numero = dlp_3.dlp_pjt_numero)
49. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=14,474,589.86..15,626,165.43 rows=23,517,408 width=751) (actual rows= loops=)

  • Merge Cond: ((dlp.dlp_pjt_numero = dmc_detail_ligne_projet_dlp.dlp_pjt_numero) AND ((hmc.hmc_type_historique)::text = (dmc_historique_montant_commerciaux_hmc.hmc_type_historique)::text))
50. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=1,207,325.43..1,678,409.17 rows=3,326,637 width=26) (actual rows= loops=)

  • Group Key: dlp.dlp_pjt_numero, hmc.hmc_type_historique, vaa.agglo_produit
51. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,207,325.43..1,620,193.03 rows=3,326,636 width=18) (actual rows= loops=)

  • Workers Planned: 4
52. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=1,206,325.38..1,222,958.56 rows=831,659 width=18) (actual rows= loops=)

  • Group Key: dlp.dlp_pjt_numero, hmc.hmc_type_historique, vaa.agglo_produit
53. 0.000 0.000 ↓ 0.0

Sort (cost=1,206,325.38..1,208,404.52 rows=831,659 width=18) (actual rows= loops=)

  • Sort Key: dlp.dlp_pjt_numero, hmc.hmc_type_historique, vaa.agglo_produit
54. 0.000 0.000 ↓ 0.0

Hash Join (cost=93,890.61..1,124,549.87 rows=831,659 width=18) (actual rows= loops=)

  • Hash Cond: (hmc.dlp_detail_ligne_projet_id = dlp.dlp_dmc_id)
55. 0.000 0.000 ↓ 0.0

Hash Join (cost=22,069.89..1,050,546.04 rows=831,659 width=18) (actual rows= loops=)

  • Hash Cond: ((hmc.pve_produit_version_elementaire_id = vaa.pve_dmc_id) AND (hmc.ccd_concedant_id = vaa.ccd_dmc_id))
56. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,501.79..1,029,641.15 rows=2,349,854 width=18) (actual rows= loops=)

  • Hash Cond: (hmc.pve_produit_version_elementaire_id = pve.pve_dmc_id)
57. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on dmc_historique_montant_commerciaux_hmc hmc (cost=0.00..994,074.71 rows=8,405,371 width=14) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash (cost=12,916.95..12,916.95 rows=46,787 width=4) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_elementaire_pve pve (cost=0.00..12,916.95 rows=46,787 width=4) (actual rows= loops=)

  • Filter: ((pve_pdv_univers)::text = 'BUS'::text)
60. 0.000 0.000 ↓ 0.0

Hash (cost=5,135.44..5,135.44 rows=228,844 width=20) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_var_agglo_vaa vaa (cost=0.00..5,135.44 rows=228,844 width=20) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Hash (cost=64,584.21..64,584.21 rows=578,921 width=8) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp dlp (cost=0.00..64,584.21 rows=578,921 width=8) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Materialize (cost=13,267,264.42..13,601,612.72 rows=23,517,408 width=751) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=13,267,264.42..13,542,819.20 rows=23,517,408 width=751) (actual rows= loops=)

  • Merge Cond: (dmc_detail_ligne_projet_dlp.dlp_pjt_numero = r.dlp_pjt_numero)
  • Join Filter: ((r.dlp_lpr_dw_id = dmc_detail_ligne_projet_dlp.dlp_lpr_dw_id) AND ((r.hmc_type_historique)::text = (dmc_historique_montant_commerciaux_hmc.hmc_type_historique)::text))
66. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=12,123,412.38..12,321,509.56 rows=23,517,408 width=747) (actual rows= loops=)

  • Merge Cond: ((dmc_detail_ligne_projet_dlp.dlp_pjt_numero = multiville.dlp_pjt_numero) AND ((dmc_historique_montant_commerciaux_hmc.hmc_type_historique)::text = (multiville.hmc_type_historique)::text))
67. 0.000 0.000 ↓ 0.0

Sort (cost=12,098,205.22..12,156,998.74 rows=23,517,408 width=683) (actual rows= loops=)

  • Sort Key: dmc_detail_ligne_projet_dlp.dlp_pjt_numero, dmc_historique_montant_commerciaux_hmc.hmc_type_historique
68. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,908.88..2,064,845.83 rows=23,517,408 width=683) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.tpu_type_pub_id = dmc_type_pub_tpu.tpu_dmc_id)
69. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,903.98..2,001,079.59 rows=23,517,408 width=672) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.ste_societe_id = dmc_societe_ste.ste_dmc_id)
70. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,902.82..1,901,969.35 rows=23,517,408 width=668) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.ccd_concedant_id = dmc_concedant_ccd.ccd_dmc_id)
71. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,895.79..1,838,767.50 rows=23,517,408 width=664) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.cmc_commercial_initial_id = dmc_commercial_cmc_init.cmc_dmc_id)
72. 0.000 0.000 ↓ 0.0

Hash Join (cost=123,882.93..1,775,810.19 rows=23,517,408 width=664) (actual rows= loops=)

  • Hash Cond: (dmc_detail_ligne_projet_dlp.tan_tiers_annonceur_id = dmc_tiers_annonceur_tan.tan_dmc_id)
73. 0.000 0.000 ↓ 0.0

Hash Join (cost=122,364.47..1,712,546.17 rows=23,517,408 width=668) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.dlp_detail_ligne_projet_id = dmc_detail_ligne_projet_dlp.dlp_dmc_id)
74. 0.000 0.000 ↓ 0.0

Hash Join (cost=50,543.75..1,578,991.80 rows=23,517,408 width=191) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.pve_produit_version_elementaire_id = dmc_produit_version_elementaire_pve.pve_dmc_id)
75. 0.000 0.000 ↓ 0.0

Hash Join (cost=35,953.24..1,502,666.52 rows=23,517,408 width=179) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.pvv_produit_version_vendu_id = dmc_produit_version_vendu_pvv.pvv_dmc_id)
76. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,750.04..1,406,729.37 rows=23,517,408 width=122) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.cmc_commercial_portefeuille_id = dmc_commercial_cmc_port.cmc_dmc_id)
  • Join Filter: (((dmc_historique_montant_commerciaux_hmc.hmc_pourcentage_ventilation_portefeuille <> '0'::numeric) AND (dmc_calendrier_cal.cal_annee >= 2,000)) OR ((dmc_cale (...)
77. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,737.18..1,336,237.30 rows=25,741,725 width=126) (actual rows= loops=)

  • Hash Cond: (dmc_historique_montant_commerciaux_hmc.cal_date_historique_id = dmc_calendrier_cal.cal_dmc_id)
78. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_historique_montant_commerciaux_hmc (cost=0.00..1,246,235.84 rows=33,621,484 width=118) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Hash (cost=1,283.09..1,283.09 rows=36,327 width=12) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_calendrier_cal (cost=0.00..1,283.09 rows=36,327 width=12) (actual rows= loops=)

  • Filter: ((cal_annee >= 2,000) OR (atterrissage IS NOT NULL))
81. 0.000 0.000 ↓ 0.0

Hash (cost=10.16..10.16 rows=216 width=12) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_commercial_cmc dmc_commercial_cmc_port (cost=0.00..10.16 rows=216 width=12) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Hash (cost=29,908.09..29,908.09 rows=343,609 width=61) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_vendu_pvv (cost=0.00..29,908.09 rows=343,609 width=61) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Hash (cost=12,498.56..12,498.56 rows=167,356 width=16) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_produit_version_elementaire_pve (cost=0.00..12,498.56 rows=167,356 width=16) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Hash (cost=64,584.21..64,584.21 rows=578,921 width=481) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp (cost=0.00..64,584.21 rows=578,921 width=481) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Hash (cost=1,253.84..1,253.84 rows=21,170 width=4) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Index Only Scan using dmc_tiers_annonceur_tan_pkey on dmc_tiers_annonceur_tan (cost=0.29..1,253.84 rows=21,170 width=4) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

Hash (cost=10.16..10.16 rows=216 width=4) (actual rows= loops=)

92. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_commercial_cmc dmc_commercial_cmc_init (cost=0.00..10.16 rows=216 width=4) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Hash (cost=4.79..4.79 rows=179 width=8) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_concedant_ccd (cost=0.00..4.79 rows=179 width=8) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=7 width=8) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_societe_ste (cost=0.00..1.07 rows=7 width=8) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Hash (cost=3.29..3.29 rows=129 width=15) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_type_pub_tpu (cost=0.00..3.29 rows=129 width=15) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Sort (cost=25,207.16..25,784.83 rows=231,068 width=214) (actual rows= loops=)

  • Sort Key: multiville.dlp_pjt_numero, multiville.hmc_type_historique
100. 0.000 0.000 ↓ 0.0

CTE Scan on multiville (cost=0.00..4,621.36 rows=231,068 width=214) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Materialize (cost=1,143,852.04..1,143,979.31 rows=863 width=18) (actual rows= loops=)

102. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,143,852.04..1,143,968.52 rows=863 width=18) (actual rows= loops=)

  • Group Key: r.dlp_pjt_numero, r.dlp_lpr_dw_id, r.hmc_type_historique
103. 0.000 0.000 ↓ 0.0

Sort (cost=1,143,852.04..1,143,873.61 rows=8,628 width=14) (actual rows= loops=)

  • Sort Key: r.dlp_pjt_numero, r.dlp_lpr_dw_id, r.hmc_type_historique
104. 0.000 0.000 ↓ 0.0

Subquery Scan on r (cost=1,141,449.97..1,143,288.00 rows=8,628 width=14) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Unique (cost=1,141,449.97..1,143,201.72 rows=8,628 width=18) (actual rows= loops=)

106. 0.000 0.000 ↓ 0.0

Sort (cost=1,141,449.97..1,141,741.93 rows=116,783 width=18) (actual rows= loops=)

  • Sort Key: dlp_1.dlp_pjt_numero, dlp_1.dlp_lpr_dw_id, dlp_1.dlp_dml_dw_id, hmc_1.hmc_type_historique, dlp_1.dlp_duree
107. 0.000 0.000 ↓ 0.0

Gather (cost=68,515.00..1,131,620.66 rows=116,783 width=18) (actual rows= loops=)

  • Workers Planned: 4
108. 0.000 0.000 ↓ 0.0

Hash Join (cost=67,515.00..1,118,942.36 rows=29,196 width=18) (actual rows= loops=)

  • Hash Cond: (hmc_1.dlp_detail_ligne_projet_id = dlp_1.dlp_dmc_id)
109. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on dmc_historique_montant_commerciaux_hmc hmc_1 (cost=0.00..1,036,101.56 rows=5,838,353 width=6) (actual rows= loops=)

  • Filter: ((NOT hmc_histo) AND (hmc_pourcentage_ventilation_portefeuille <> 0.0) AND ((hmc_type_ventilation_portefeuille)::text = 'ACHAT'::text))
110. 0.000 0.000 ↓ 0.0

Hash (cost=67,478.82..67,478.82 rows=2,895 width=20) (actual rows= loops=)

111. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_detail_ligne_projet_dlp dlp_1 (cost=0.00..67,478.82 rows=2,895 width=20) (actual rows= loops=)

  • Filter: (upper((dlp_libelle)::text) = 'ESPACE'::text)
112. 0.000 0.000 ↓ 0.0

Hash (cost=2.91..2.91 rows=91 width=37) (actual rows= loops=)

113. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_concedant_dept_cde (cost=0.00..2.91 rows=91 width=37) (actual rows= loops=)

114.          

SubPlan (for Hash Left Join)

115. 0.000 0.000 ↓ 0.0

Unique (cost=10,000,000,053.09..10,000,000,057.20 rows=1 width=10) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10,000,000,053.09..10,000,000,057.20 rows=1 width=10) (actual rows= loops=)

117. 0.000 0.000 ↓ 0.0

Merge Join (cost=52.94..53.02 rows=1 width=14) (actual rows= loops=)

  • Merge Cond: ((pvv.pvv_dep_departement_geographique_libelle)::text = (dmc_commercial_departement_cde.dep_libelle)::text)
118. 0.000 0.000 ↓ 0.0

Sort (cost=8.45..8.46 rows=1 width=10) (actual rows= loops=)

  • Sort Key: pvv.pvv_dep_departement_geographique_libelle
119. 0.000 0.000 ↓ 0.0

Index Scan using dmc_produit_version_vendu_pvv_pkey on dmc_produit_version_vendu_pvv pvv (cost=0.42..8.44 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (pvv_dmc_id = dmc_produit_version_vendu_pvv.pvv_dmc_id)
120. 0.000 0.000 ↓ 0.0

Sort (cost=44.49..44.52 rows=13 width=14) (actual rows= loops=)

  • Sort Key: dmc_commercial_departement_cde.dep_libelle
121. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_commercial_departement_cde (cost=0.00..44.25 rows=13 width=14) (actual rows= loops=)

  • Filter: (cmc_commercial_id = dmc_detail_ligne_projet_dlp.cmc_dmc_id)
122. 0.000 0.000 ↓ 0.0

Index Only Scan using dmc_commercial_cmc_pkey on dmc_commercial_cmc (cost=0.14..4.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (cmc_dmc_id = dmc_detail_ligne_projet_dlp.cmc_dmc_id)
123. 0.000 0.000 ↓ 0.0

Unique (cost=10,000,000,053.09..10,000,000,057.20 rows=1 width=10) (actual rows= loops=)

124. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10,000,000,053.09..10,000,000,057.20 rows=1 width=10) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Merge Join (cost=52.94..53.02 rows=1 width=14) (actual rows= loops=)

  • Merge Cond: ((pvv_1.pvv_dep_departement_geographique_libelle)::text = (dmc_commercial_departement_cde_1.dep_libelle)::text)
126. 0.000 0.000 ↓ 0.0

Sort (cost=8.45..8.46 rows=1 width=10) (actual rows= loops=)

  • Sort Key: pvv_1.pvv_dep_departement_geographique_libelle
127. 0.000 0.000 ↓ 0.0

Index Scan using dmc_produit_version_vendu_pvv_pkey on dmc_produit_version_vendu_pvv pvv_1 (cost=0.42..8.44 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (pvv_dmc_id = dmc_produit_version_vendu_pvv.pvv_dmc_id)
128. 0.000 0.000 ↓ 0.0

Sort (cost=44.49..44.52 rows=13 width=14) (actual rows= loops=)

  • Sort Key: dmc_commercial_departement_cde_1.dep_libelle
129. 0.000 0.000 ↓ 0.0

Seq Scan on dmc_commercial_departement_cde dmc_commercial_departement_cde_1 (cost=0.00..44.25 rows=13 width=14) (actual rows= loops=)

  • Filter: (cmc_commercial_id = dmc_detail_ligne_projet_dlp.cmc_dmc_id)
130. 0.000 0.000 ↓ 0.0

Index Only Scan using dmc_commercial_cmc_pkey on dmc_commercial_cmc dmc_commercial_cmc_1 (cost=0.14..4.16 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (cmc_dmc_id = dmc_detail_ligne_projet_dlp.cmc_dmc_id)