explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A7vT : Without concat REC

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

Hash Join (cost=11,726,838.63..13,427,133.98 rows=1,483,244 width=265) (actual rows= loops=)

  • Hash Cond: ("CMO2"."Region DTRH" = "CMO"."Region DTRH")
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,726,835.34..13,234,926.99 rows=72,708 width=244) (actual rows= loops=)

  • Join Filter: ("CMO2"."Region DTRH" = "P2"."Region")
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=6,671,262.69..7,955,777.08 rows=72,708 width=231) (actual rows= loops=)

  • Hash Cond: ("P"."Region" = "CMO2"."Region DTRH")
4. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=6,671,256.34..7,944,137.45 rows=2,908,321 width=218) (actual rows= loops=)

  • Merge Cond: (("P".id_scenario = "B&R2".id_scenario) AND ("P"."Scenario" = "B&R2"."Scenario") AND ("P"."Annee" = "B&R2"."Annee") AND ("P"."Region" = "B&R2"."Region") AND ("P"."Metier" = "B&R2"."Metier") AND ("P"."Specialite" = "B&R2"."Specialite") AND ("P"."Libelle_spe" = "B&R2"."Libelle_spe"))
5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=6,646,060.15..7,838,471.64 rows=2,908,321 width=130) (actual rows= loops=)

  • Group Key: "P".id_scenario, "P"."Scenario", "P"."Annee", "P"."Region", "P"."Metier", "P"."Specialite", "P"."Libelle_spe", "P"."Statut
6. 0.000 0.000 ↓ 0.0

Sort (cost=6,646,060.15..6,718,768.17 rows=29,083,207 width=130) (actual rows= loops=)

  • Sort Key: "P".id_scenario, "P"."Scenario", "P"."Annee", "P"."Region", "P"."Metier", "P"."Specialite", "P"."Libelle_spe", "P"."Statut
7. 0.000 0.000 ↓ 0.0

Seq Scan on "PresenceOD" "P" (cost=0.00..1,052,549.07 rows=29,083,207 width=130) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=25,196.19..25,257.54 rows=24,539 width=159) (actual rows= loops=)

  • Sort Key: "B&R2".id_scenario, "B&R2"."Scenario", "B&R2"."Annee", "B&R2"."Region", "B&R2"."Metier", "B&R2"."Specialite", "B&R2"."Libelle_spe
9. 0.000 0.000 ↓ 0.0

Subquery Scan on B&R2 (cost=22,916.17..23,406.95 rows=24,539 width=159) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

HashAggregate (cost=22,916.17..23,161.56 rows=24,539 width=159) (actual rows= loops=)

  • Group Key: "B&R".id_scenario, "B&R"."Scenario", "B&R"."Annee", "B&R"."Region", "B&R"."Metier", "B&R"."Specialite", "B&R"."Libelle_spe
11. 0.000 0.000 ↓ 0.0

Seq Scan on "BesoinED" "B&R" (cost=0.00..11,873.85 rows=245,385 width=159) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=6.29..6.29 rows=5 width=13) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Subquery Scan on CMO2 (cost=5.42..6.29 rows=5 width=13) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5.42..6.24 rows=5 width=15) (actual rows= loops=)

  • Group Key: "CMO_1"."Region DTRH
15. 0.000 0.000 ↓ 0.0

Sort (cost=5.42..5.68 rows=102 width=15) (actual rows= loops=)

  • Sort Key: "CMO_1"."Region DTRH
16. 0.000 0.000 ↓ 0.0

Seq Scan on "CMO_Region_X_Y" "CMO_1" (cost=0.00..2.02 rows=102 width=15) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Materialize (cost=5,055,572.65..5,273,696.83 rows=5 width=13) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Subquery Scan on P2 (cost=5,055,572.65..5,273,696.80 rows=5 width=13) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5,055,572.65..5,273,696.75 rows=5 width=8) (actual rows= loops=)

  • Group Key: "P_1"."Region
20. 0.000 0.000 ↓ 0.0

Sort (cost=5,055,572.65..5,128,280.67 rows=29,083,207 width=8) (actual rows= loops=)

  • Sort Key: "P_1"."Region
21. 0.000 0.000 ↓ 0.0

Seq Scan on "PresenceOD" "P_1" (cost=0.00..1,052,549.07 rows=29,083,207 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=2.02..2.02 rows=102 width=31) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on "CMO_Region_X_Y" "CMO" (cost=0.00..2.02 rows=102 width=31) (actual rows= loops=)