explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xM8L

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

Unique (cost=2,200,359.81..2,200,359.85 rows=2 width=1,298) (actual rows= loops=)

  • JIT:
  • Functions: 330
2. 0.000 0.000 ↓ 0.0

Sort (cost=2,200,359.81..2,200,359.82 rows=2 width=1,298) (actual rows= loops=)

  • Sort Key: p.produit_id, (COALESCE(cp_ean.valeur, cp_isbn.valeur, p.code)), p.asin, pl.nom_plateforme, ('achat'::text), (COALESCE(pt.ttl, $0, 172800)), apt.date_updated
3. 0.000 0.000 ↓ 0.0

Append (cost=847,346.57..2,200,359.80 rows=2 width=1,298) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Unique (cost=847,346.57..847,346.59 rows=1 width=585) (actual rows= loops=)

5.          

Initplan (for Unique)

6. 0.000 0.000 ↓ 0.0

Seq Scan on param (cost=0.00..1.51 rows=1 width=4) (actual rows= loops=)

  • Filter: ((name)::text = 'ttl_defaut_achat'::text)
7. 0.000 0.000 ↓ 0.0

Seq Scan on adminpricing_typecode (cost=0.00..1.04 rows=1 width=4) (actual rows= loops=)

  • Filter: ((libelle)::text = 'EAN'::text)
8. 0.000 0.000 ↓ 0.0

Seq Scan on adminpricing_typecode adminpricing_typecode_1 (cost=0.00..1.04 rows=1 width=4) (actual rows= loops=)

  • Filter: ((libelle)::text = 'ISBN'::text)
9. 0.000 0.000 ↓ 0.0

Sort (cost=847,342.99..847,342.99 rows=1 width=585) (actual rows= loops=)

  • Sort Key: p.produit_id, (COALESCE(cp_ean.valeur, cp_isbn.valeur, p.code)), p.asin, pl.nom_plateforme, (COALESCE(pt.ttl, $0, 172800)), apt.date_updated
10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=37,298.60..847,342.98 rows=1 width=585) (actual rows= loops=)

  • Join Filter: (nep.marketplace_id = pl.plateforme_id)
  • Filter: (nep.nonexistent_product_id IS NULL)
11. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=37,298.04..847,341.44 rows=1 width=74) (actual rows= loops=)

  • Join Filter: (apt.plateforme_id_fk = pl.plateforme_id)
12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=37,297.47..847,337.46 rows=1 width=66) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=37,296.90..847,336.68 rows=1 width=55) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=37,296.32..847,335.90 rows=1 width=44) (actual rows= loops=)

  • Join Filter: (pt.marketplace_id = pl.plateforme_id)
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37,295.76..847,334.17 rows=1 width=40) (actual rows= loops=)

  • Join Filter: ((s.societe_id = psa.societe_id_fk) AND (pl_vente.plateforme_id = psa.plateforme_id_fk))
16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=37,295.61..847,333.71 rows=1 width=56) (actual rows= loops=)

  • Join Filter: (i.plateforme_vente_id_fk = pl_vente.plateforme_id)
17. 0.000 0.000 ↓ 0.0

Index Only Scan using plateforme_plateforme_id_actif_idx on plateforme pl_vente (cost=0.14..2.70 rows=24 width=4) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Materialize (cost=37,295.47..847,330.66 rows=1 width=52) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Gather (cost=37,295.47..847,330.65 rows=1 width=52) (actual rows= loops=)

  • Workers Planned: 2
20. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=36,295.47..846,330.55 rows=1 width=52) (actual rows= loops=)

  • Hash Cond: (p.produit_id = ps.produit_id)
  • Filter: (ps.id IS NULL)
21. 0.000 0.000 ↓ 0.0

Merge Join (cost=35,853.92..838,101.69 rows=2,966,595 width=52) (actual rows= loops=)

  • Merge Cond: (c.template_pricing_categorie_id_fk = tpc.template_pricing_categorie_id)
22. 0.000 0.000 ↓ 0.0

Merge Join (cost=35,848.28..1,149,758.54 rows=2,925,684 width=60) (actual rows= loops=)

  • Merge Cond: (c.template_pricing_categorie_id_fk = iapfps.template_pricing_categorie_id_fk)
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=35,567.78..1,561,736.98 rows=694,730 width=30) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Parallel Index Scan using categorie_template_id_fk_active_ix_2 on categorie c (cost=0.42..16,011.08 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (active = 1)
  • Filter: ((nb_produit > 0) AND (categorie_id = 36381) AND (is_selling = 1))
25. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on produit p (cost=35,567.36..1,529,052.39 rows=1,667,351 width=30) (actual rows= loops=)

  • Recheck Cond: ((categorie_id_fk = 36381) AND (deleted = 0))
26. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on produit_categorie_deleted_ix (cost=0.00..35,150.52 rows=1,667,351 width=0) (actual rows= loops=)

  • Index Cond: ((categorie_id_fk = 36381) AND (deleted = 0))
27. 0.000 0.000 ↓ 0.0

Sort (cost=273.90..278.66 rows=1,904 width=30) (actual rows= loops=)

  • Sort Key: iapfps.template_pricing_categorie_id_fk
28. 0.000 0.000 ↓ 0.0

Hash Join (cost=14.79..170.19 rows=1,904 width=30) (actual rows= loops=)

  • Hash Cond: (iapfps.algorithme_pricing_id_fk = ap.algorithme_pricing_id)
29. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.15..158.42 rows=1,904 width=34) (actual rows= loops=)

  • Hash Cond: (iapfps.societe_id_fk = s.societe_id)
30. 0.000 0.000 ↓ 0.0

Hash Join (cost=6.40..150.59 rows=2,036 width=30) (actual rows= loops=)

  • Hash Cond: (i.plateforme_achat_id_fk = pl.plateforme_id)
31. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.95..136.56 rows=4,071 width=20) (actual rows= loops=)

  • Hash Cond: (iapfps.itineraire_id_fk = i.itineraire_id)
32. 0.000 0.000 ↓ 0.0

Seq Scan on itineraire_algorithme_pricing_fdp_poids_set iapfps (cost=0.00..120.64 rows=4,071 width=16) (actual rows= loops=)

  • Filter: (actif = 1)
33. 0.000 0.000 ↓ 0.0

Hash (cost=2.98..2.98 rows=158 width=12) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Seq Scan on itineraire i (cost=0.00..2.98 rows=158 width=12) (actual rows= loops=)

  • Filter: (actif = 1)
35. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=12 width=14) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on plateforme pl (cost=0.00..1.30 rows=12 width=14) (actual rows= loops=)

  • Filter: (calcul_prix_achat = 1)
37. 0.000 0.000 ↓ 0.0

Hash (cost=1.39..1.39 rows=29 width=4) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on societe s (cost=0.00..1.39 rows=29 width=4) (actual rows= loops=)

  • Filter: (active = 1)
39. 0.000 0.000 ↓ 0.0

Hash (cost=4.69..4.69 rows=156 width=4) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Index Only Scan using algorithme_pricing_id_pkey on algorithme_pricing ap (cost=0.14..4.69 rows=156 width=4) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Index Scan using template_pricing_categorie_id_pkey on template_pricing_categorie tpc (cost=0.27..26.37 rows=307 width=4) (actual rows= loops=)

  • Filter: (active = 1)
42. 0.000 0.000 ↓ 0.0

Hash (cost=275.69..275.69 rows=13,269 width=8) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on adminpricing_produitstock ps (cost=0.00..275.69 rows=13,269 width=8) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Index Scan using plateforme_societe_account_ix_2 on plateforme_societe_account psa (cost=0.15..0.40 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (societe_id_fk = iapfps.societe_id_fk)
  • Filter: ((actif = 1) AND (principal = 1))
45. 0.000 0.000 ↓ 0.0

Index Scan using produit_ttl_produit_id_fk_5c472ea5 on produit_ttl pt (cost=0.56..1.48 rows=20 width=12) (actual rows= loops=)

  • Index Cond: (p.produit_id = produit_id_fk)
46. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_codeproduit_8eb6132c on adminpricing_codeproduit cp_ean (cost=0.57..2.85 rows=11 width=15) (actual rows= loops=)

  • Index Cond: (produit_id = p.produit_id)
  • Filter: (type_code_id = $1)
47. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_codeproduit_8eb6132c on adminpricing_codeproduit cp_isbn (cost=0.57..2.85 rows=11 width=15) (actual rows= loops=)

  • Index Cond: (produit_id = p.produit_id)
  • Filter: (type_code_id = $2)
48. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_pricingtracking_produit_id_fk_285101c9 on adminpricing_pricingtracking apt (cost=0.57..3.92 rows=5 width=16) (actual rows= loops=)

  • Index Cond: (produit_id_fk = p.produit_id)
  • Filter: (((timezone('EDT'::text, now()))::timestamp with time zone - date_updated) <= '7 days'::interval)
49. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_nonexistent_produit_id_marketplace_i_a17d1865_uniq on adminpricing_nonexistentproducts nep (cost=0.56..1.51 rows=2 width=16) (actual rows= loops=)

  • Index Cond: (produit_id = p.produit_id)
  • Filter: (NOT "exists")
50. 0.000 0.000 ↓ 0.0

Unique (cost=1,353,013.16..1,353,013.18 rows=1 width=585) (actual rows= loops=)

51.          

Initplan (for Unique)

52. 0.000 0.000 ↓ 0.0

Seq Scan on param param_1 (cost=0.00..1.51 rows=1 width=4) (actual rows= loops=)

  • Filter: ((name)::text = 'ttl_defaut_vente'::text)
53. 0.000 0.000 ↓ 0.0

Seq Scan on adminpricing_typecode adminpricing_typecode_2 (cost=0.00..1.04 rows=1 width=4) (actual rows= loops=)

  • Filter: ((libelle)::text = 'EAN'::text)
54. 0.000 0.000 ↓ 0.0

Seq Scan on adminpricing_typecode adminpricing_typecode_3 (cost=0.00..1.04 rows=1 width=4) (actual rows= loops=)

  • Filter: ((libelle)::text = 'ISBN'::text)
55. 0.000 0.000 ↓ 0.0

Sort (cost=1,353,009.57..1,353,009.58 rows=1 width=585) (actual rows= loops=)

  • Sort Key: p_1.produit_id, (COALESCE(cp_ean_1.valeur, cp_isbn_1.valeur, p_1.code)), p_1.asin, pl_1.nom_plateforme, (COALESCE(pt_1.ttl, $3, 172800)), apt_1.date_updated
56. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=372,862.15..1,353,009.56 rows=1 width=585) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=372,861.58..1,353,008.78 rows=1 width=59) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Nested Loop (cost=372,861.01..1,353,008.00 rows=1 width=48) (actual rows= loops=)

  • Join Filter: ((s_1.societe_id = psc.societe_id_fk) AND (pl_1.plateforme_id = psc.plateforme_id_fk))
59. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=372,860.86..1,353,007.54 rows=1 width=64) (actual rows= loops=)

  • Join Filter: (apt_1.plateforme_id_fk = pl_1.plateforme_id)
60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=372,860.29..1,353,003.56 rows=1 width=56) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=372,859.72..1,353,001.48 rows=1 width=56) (actual rows= loops=)

  • Join Filter: (pt_1.marketplace_id = pl_1.plateforme_id)
62. 0.000 0.000 ↓ 0.0

Gather (cost=372,859.16..1,352,999.75 rows=1 width=52) (actual rows= loops=)

  • Workers Planned: 2
63. 0.000 0.000 ↓ 0.0

Parallel Hash Left Join (cost=371,859.16..1,351,999.65 rows=1 width=52) (actual rows= loops=)

  • Hash Cond: ((p_1.produit_id = nep_1.produit_id) AND (pl_1.plateforme_id = nep_1.marketplace_id))
  • Filter: (nep_1.nonexistent_product_id IS NULL)
64. 0.000 0.000 ↓ 0.0

Merge Join (cost=35,942.38..873,421.17 rows=4,944,325 width=52) (actual rows= loops=)

  • Merge Cond: (c_1.template_pricing_categorie_id_fk = tpc_1.template_pricing_categorie_id)
65. 0.000 0.000 ↓ 0.0

Merge Join (cost=35,936.66..1,179,093.36 rows=4,876,140 width=60) (actual rows= loops=)

  • Merge Cond: (c_1.template_pricing_categorie_id_fk = iapfps_1.template_pricing_categorie_id_fk)
66. 0.000 0.000 ↓ 0.0

Nested Loop (cost=35,567.78..1,561,736.98 rows=694,730 width=30) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

Parallel Index Scan using categorie_template_id_fk_active_ix_2 on categorie c_1 (cost=0.42..16,011.08 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (active = 1)
  • Filter: ((nb_produit > 0) AND (categorie_id = 36381) AND (is_selling = 1))
68. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on produit p_1 (cost=35,567.36..1,529,052.39 rows=1,667,351 width=30) (actual rows= loops=)

  • Recheck Cond: ((categorie_id_fk = 36381) AND (deleted = 0))
69. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on produit_categorie_deleted_ix (cost=0.00..35,150.52 rows=1,667,351 width=0) (actual rows= loops=)

  • Index Cond: ((categorie_id_fk = 36381) AND (deleted = 0))
70. 0.000 0.000 ↓ 0.0

Sort (cost=362.28..370.21 rows=3,173 width=30) (actual rows= loops=)

  • Sort Key: iapfps_1.template_pricing_categorie_id_fk
71. 0.000 0.000 ↓ 0.0

Hash Join (cost=14.89..177.74 rows=3,173 width=30) (actual rows= loops=)

  • Hash Cond: (iapfps_1.algorithme_pricing_id_fk = ap_1.algorithme_pricing_id)
72. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.25..162.56 rows=3,173 width=34) (actual rows= loops=)

  • Hash Cond: (iapfps_1.societe_id_fk = s_1.societe_id)
73. 0.000 0.000 ↓ 0.0

Hash Join (cost=6.50..150.69 rows=3,392 width=30) (actual rows= loops=)

  • Hash Cond: (i_1.plateforme_vente_id_fk = pl_1.plateforme_id)
74. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.95..136.56 rows=4,071 width=16) (actual rows= loops=)

  • Hash Cond: (iapfps_1.itineraire_id_fk = i_1.itineraire_id)
75. 0.000 0.000 ↓ 0.0

Seq Scan on itineraire_algorithme_pricing_fdp_poids_set iapfps_1 (cost=0.00..120.64 rows=4,071 width=16) (actual rows= loops=)

  • Filter: (actif = 1)
76. 0.000 0.000 ↓ 0.0

Hash (cost=2.98..2.98 rows=158 width=8) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Seq Scan on itineraire i_1 (cost=0.00..2.98 rows=158 width=8) (actual rows= loops=)

  • Filter: (actif = 1)
78. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=20 width=14) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Seq Scan on plateforme pl_1 (cost=0.00..1.30 rows=20 width=14) (actual rows= loops=)

  • Filter: (actif = 1)
80. 0.000 0.000 ↓ 0.0

Hash (cost=1.39..1.39 rows=29 width=4) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Seq Scan on societe s_1 (cost=0.00..1.39 rows=29 width=4) (actual rows= loops=)

  • Filter: (active = 1)
82. 0.000 0.000 ↓ 0.0

Hash (cost=4.69..4.69 rows=156 width=4) (actual rows= loops=)

83. 0.000 0.000 ↓ 0.0

Index Only Scan using algorithme_pricing_id_pkey on algorithme_pricing ap_1 (cost=0.14..4.69 rows=156 width=4) (actual rows= loops=)

84. 0.000 0.000 ↓ 0.0

Index Scan using template_pricing_categorie_id_pkey on template_pricing_categorie tpc_1 (cost=0.27..26.37 rows=307 width=4) (actual rows= loops=)

  • Filter: (active = 1)
85. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=253,933.11..253,933.11 rows=4,123,311 width=16) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on adminpricing_nonexistentproducts nep_1 (cost=0.00..253,933.11 rows=4,123,311 width=16) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Index Scan using produit_ttl_produit_id_fk_5c472ea5 on produit_ttl pt_1 (cost=0.56..1.48 rows=20 width=12) (actual rows= loops=)

  • Index Cond: (p_1.produit_id = produit_id_fk)
88. 0.000 0.000 ↓ 0.0

Index Scan using produit_prix_achat_produit_id_fk_58af2e0289034a16_uniq on produit_prix_achat ppa (cost=0.56..2.05 rows=3 width=4) (actual rows= loops=)

  • Index Cond: (produit_id_fk = p_1.produit_id)
  • Filter: (prix_achat > '0'::numeric)
89. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_pricingtracking_produit_id_fk_285101c9 on adminpricing_pricingtracking apt_1 (cost=0.57..3.92 rows=5 width=16) (actual rows= loops=)

  • Index Cond: (produit_id_fk = p_1.produit_id)
  • Filter: (((timezone('EDT'::text, now()))::timestamp with time zone - date_updated) <= '7 days'::interval)
90. 0.000 0.000 ↓ 0.0

Index Scan using plateforme_societe_account_ix_2 on plateforme_societe_account psc (cost=0.15..0.40 rows=4 width=8) (actual rows= loops=)

  • Index Cond: (societe_id_fk = iapfps_1.societe_id_fk)
  • Filter: ((actif = 1) AND (principal = 1))
91. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_codeproduit_8eb6132c on adminpricing_codeproduit cp_ean_1 (cost=0.57..2.85 rows=11 width=15) (actual rows= loops=)

  • Index Cond: (produit_id = p_1.produit_id)
  • Filter: (type_code_id = $4)
92. 0.000 0.000 ↓ 0.0

Index Scan using adminpricing_codeproduit_8eb6132c on adminpricing_codeproduit cp_isbn_1 (cost=0.57..2.85 rows=11 width=15) (actual rows= loops=)

  • Index Cond: (produit_id = p_1.produit_id)
  • Filter: (type_code_id = $5)