explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ecIt

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

Nested Loop (cost=13,678.79..67,703.98 rows=1 width=1,208) (actual rows= loops=)

  • Join Filter: ((je.journee >= afp.date_applicabilite) AND (je.journee <= afp.date_fin_applicabilite) AND (je.journee >= mfpp.date_applicabilite) AND (je.journee <= mfpp.date_fin_applicabilite))
2.          

CTE filiere_article

3. 0.000 0.000 ↓ 0.0

WindowAgg (cost=0.29..1,706.24 rows=17,229 width=32) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Index Scan using article_filiere_preparation_uk on article_filiere_preparation af (cost=0.29..1,361.66 rows=17,229 width=24) (actual rows= loops=)

5.          

CTE plateforme_filiere

6. 0.000 0.000 ↓ 0.0

WindowAgg (cost=218.85..286.67 rows=2,713 width=40) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=218.85..225.63 rows=2,713 width=32) (actual rows= loops=)

  • Sort Key: magasin_filiere_preparation_plateforme.magasin_id, magasin_filiere_preparation_plateforme.filiere_preparation_id, magasin_filiere_preparation_plateforme.date_applicabilite
8. 0.000 0.000 ↓ 0.0

Seq Scan on magasin_filiere_preparation_plateforme (cost=0.00..64.13 rows=2,713 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,685.60..65,710.42 rows=2 width=1,699) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=11,685.16..65,709.14 rows=1 width=1,695) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,684.88..65,708.83 rows=1 width=1,669) (actual rows= loops=)

  • Hash Cond: ((art.id = afp.article_id) AND (mfpp.filiere_preparation_id = afp.filiere_preparation_id))
12. 0.000 0.000 ↓ 0.0

Hash Join (cost=11,081.86..64,760.81 rows=80 width=1,677) (actual rows= loops=)

  • Hash Cond: (mag.id = mfpp.magasin_id)
13. 0.000 0.000 ↓ 0.0

Gather (cost=11,017.02..64,679.95 rows=676 width=1,153) (actual rows= loops=)

  • Workers Planned: 2
14. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=10,017.02..63,612.35 rows=282 width=1,153) (actual rows= loops=)

  • Hash Cond: (lea.engagement_commande_id = cdcqec.id_src)
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,012.86..61,756.68 rows=704,147 width=1,161) (actual rows= loops=)

  • Hash Cond: (art.unite_detail_id = united.id)
16. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,011.79..57,296.01 rows=704,147 width=653) (actual rows= loops=)

  • Hash Cond: (ass.unite_id = unite_comptage.id)
17. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,010.73..52,835.34 rows=704,147 width=145) (actual rows= loops=)

  • Hash Cond: (lea.article_id = art.id)
18. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=8,966.07..49,941.84 rows=704,147 width=124) (actual rows= loops=)

  • Hash Cond: (lea.engagement_commande_id = ec.id)
19. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on ligne_engagement_article lea (cost=0.00..35,352.52 rows=717,152 width=38) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=7,587.70..7,587.70 rows=110,270 width=86) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Join (cost=250.88..7,587.70 rows=110,270 width=86) (actual rows= loops=)

  • Hash Cond: (ass.groupe_article_id = gart.id)
22. 0.000 0.000 ↓ 0.0

Hash Join (cost=249.37..7,243.39 rows=110,270 width=94) (actual rows= loops=)

  • Hash Cond: (ec.assortiment_id = ass.id)
23. 0.000 0.000 ↓ 0.0

Hash Join (cost=104.03..6,808.21 rows=110,270 width=61) (actual rows= loops=)

  • Hash Cond: (ec.magasin_id = mag.id)
24. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on engagement_commande ec (cost=0.00..6,413.84 rows=110,270 width=48) (actual rows= loops=)

  • Filter: ((statut)::text = ANY ('{VALIDE,ENVOYE}'::text[]))
25. 0.000 0.000 ↓ 0.0

Hash (cost=86.79..86.79 rows=1,379 width=13) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on magasin mag (cost=0.00..86.79 rows=1,379 width=13) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Hash (cost=105.15..105.15 rows=3,215 width=49) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on assortiment ass (cost=0.00..105.15 rows=3,215 width=49) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Hash (cost=1.23..1.23 rows=23 width=8) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on groupe_article gart (cost=0.00..1.23 rows=23 width=8) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Hash (cost=829.29..829.29 rows=17,229 width=21) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Seq Scan on article art (cost=0.00..829.29 rows=17,229 width=21) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=524) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on unite unite_comptage (cost=0.00..1.03 rows=3 width=524) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=524) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on unite united (cost=0.00..1.03 rows=3 width=524) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=4.14..4.14 rows=1 width=4) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Index Scan using idx_cdc_engagement_commande_statut_etl on cdc_engagement_commande cdcqec (cost=0.12..4.14 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((statut_etl)::text = '1'::text)
39. 0.000 0.000 ↓ 0.0

Hash (cost=62.81..62.81 rows=163 width=548) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.27..62.81 rows=163 width=548) (actual rows= loops=)

  • Hash Cond: (mfpp.plateforme_id = pf.id)
41. 0.000 0.000 ↓ 0.0

CTE Scan on plateforme_filiere mfpp (cost=0.00..54.26 rows=2,713 width=40) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash (cost=1.12..1.12 rows=12 width=524) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on plateforme pf (cost=0.00..1.12 rows=12 width=524) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=344.58..344.58 rows=17,229 width=32) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

CTE Scan on filiere_article afp (cost=0.00..344.58 rows=17,229 width=32) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Index Scan using conditionnement_pkey on conditionnement cond (cost=0.29..0.31 rows=1 width=42) (actual rows= loops=)

  • Index Cond: (id = lea.conditionnement_id)
47. 0.000 0.000 ↓ 0.0

Index Scan using quantite_engagement_commande_ligne_engagement_article_idx on quantite_engagement_commande qec (cost=0.43..1.10 rows=18 width=20) (actual rows= loops=)

  • Index Cond: (ligne_engagement_article_id = lea.id)
48. 0.000 0.000 ↓ 0.0

Index Scan using journee_expedition_pkey on journee_expedition je (cost=0.28..0.30 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = qec.journee_expedition_id)