explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sh8B

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 321.710 ↑ 1.0 100 1

Limit (cost=364,310.09..364,321.75 rows=100 width=203) (actual time=321.664..321.710 rows=100 loops=1)

2. 8.375 321.705 ↑ 90.3 100 1

Gather Merge (cost=364,310.09..365,364.13 rows=9,034 width=203) (actual time=321.663..321.705 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.135 313.330 ↑ 22.0 205 3 / 3

Sort (cost=363,310.06..363,321.35 rows=4,517 width=203) (actual time=313.322..313.330 rows=205 loops=3)

  • Sort Key: article.article_ecommerce DESC, article.article_id
  • Sort Method: quicksort Memory: 1,572kB
4. 1.070 311.195 ↑ 1.4 3,243 3 / 3

Merge Left Join (cost=362,888.22..363,035.85 rows=4,517 width=203) (actual time=307.100..311.195 rows=3,243 loops=3)

  • Merge Cond: (article.article_id = gtin1.gtin_article_id)
  • Join Filter: (gtin1.gtin_dossier_id = article.article_dossier_id)
5. 2.125 279.290 ↑ 1.4 3,243 3 / 3

Merge Left Join (cost=297,579.28..297,715.61 rows=4,517 width=194) (actual time=276.548..279.290 rows=3,243 loops=3)

  • Merge Cond: ((article.article_id = refachat.refachat_article_id) AND (condachat.condachat_id = refachat.refachat_condachat_id))
  • Join Filter: (refachat.refachat_dossier_id = article.article_dossier_id)
6. 1.628 266.218 ↑ 1.4 3,243 3 / 3

Sort (cost=272,270.21..272,281.50 rows=4,517 width=193) (actual time=266.104..266.218 rows=3,243 loops=3)

  • Sort Key: article.article_id, condachat.condachat_id
  • Sort Method: quicksort Memory: 1,517kB
7. 0.998 264.590 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=206,163.46..271,996.00 rows=4,517 width=193) (actual time=233.288..264.590 rows=3,243 loops=3)

  • Hash Cond: ((article.article_dossier_id = _actuel_profilachatprofiltaxe18__.profiltaxe_dossier_id) AND (_actuel_profilachatcondachat18__.condachat_profiltaxe_id = _actuel_profilachatprofiltaxe18__.profiltaxe_id))
8. 1.078 263.575 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=206,147.39..271,911.08 rows=4,517 width=179) (actual time=233.262..263.575 rows=3,243 loops=3)

  • Hash Cond: ((article.article_dossier_id = _actuel_profilachatfournisseur18__.fournisseur_dossier_id) AND (_actuel_profilachatcondachat18__.condachat_fournisseur_id = _actuel_profilachatfournisseur18__.fournisseur_id))
9. 1.392 262.253 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=205,988.54..271,683.34 rows=4,517 width=176) (actual time=233.005..262.253 rows=3,243 loops=3)

  • Hash Cond: ((article.article_dossier_id = _actuel_profilachatcondachat18__.condachat_dossier_id) AND (_actuel_profilachat18__.tarifachatactuel_condachat_id = _actuel_profilachatcondachat18__.condachat_id))
10. 1.410 251.768 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=182,220.89..247,846.81 rows=4,517 width=172) (actual time=223.877..251.768 rows=3,243 loops=3)

  • Hash Cond: ((article.article_dossier_id = _actuel_profilachatrefachat18__.refachat_dossier_id) AND (_actuel_profilachat18__.tarifachatactuel_refachat_id = _actuel_profilachatrefachat18__.refachat_id))
11. 2.236 240.595 ↑ 1.4 3,243 3 / 3

Merge Left Join (cost=157,645.32..223,202.36 rows=4,517 width=163) (actual time=214.078..240.595 rows=3,243 loops=3)

  • Merge Cond: (article.article_id = _actuel_profilachat18__.tarifachatactuel_article_id)
  • Join Filter: (_actuel_profilachat18__.tarifachatactuel_dossier_id = article.article_dossier_id)
12. 1.650 222.554 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=133,460.28..199,005.88 rows=4,517 width=143) (actual time=198.955..222.554 rows=3,243 loops=3)

13. 2.438 214.417 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=133,459.85..169,412.02 rows=4,517 width=143) (actual time=198.939..214.417 rows=3,243 loops=3)

14. 2.391 202.249 ↑ 1.4 3,243 3 / 3

Merge Left Join (cost=133,459.29..133,482.12 rows=4,517 width=135) (actual time=198.912..202.249 rows=3,243 loops=3)

  • Merge Cond: (article.article_id = tarifachatactuel.tarifachatactuel_article_id)
  • Join Filter: (tarifachatactuel.tarifachatactuel_dossier_id = article.article_dossier_id)
15. 1.663 177.072 ↑ 1.4 3,243 3 / 3

Sort (cost=109,273.55..109,284.85 rows=4,517 width=123) (actual time=176.812..177.072 rows=3,243 loops=3)

  • Sort Key: article.article_id
  • Sort Method: quicksort Memory: 1,475kB
16. 0.610 175.409 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=12,573.43..108,999.35 rows=4,517 width=123) (actual time=145.358..175.409 rows=3,243 loops=3)

  • Hash Cond: (mesure.mesure_unitecontenance_id = _mesure_unitecontenance__.unite_id)
17. 1.465 174.112 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=12,491.69..108,860.58 rows=4,517 width=119) (actual time=144.656..174.112 rows=3,243 loops=3)

18. 2.144 169.404 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=12,491.40..107,466.04 rows=4,517 width=119) (actual time=144.639..169.404 rows=3,243 loops=3)

19. 2.277 157.530 ↑ 1.4 3,243 3 / 3

Nested Loop (cost=12,490.97..74,047.99 rows=4,517 width=60) (actual time=144.617..157.530 rows=3,243 loops=3)

20. 3.016 148.766 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=12,490.54..42,901.38 rows=4,517 width=40) (actual time=144.585..148.766 rows=3,243 loops=3)

  • Hash Cond: (article.article_articleex_id = _article_articleex__.articleex_id)
  • Filter: ((_article_articleex__.articleex_enum1 <> 3) OR (_article_articleex__.articleex_enum1 IS NULL))
  • Rows Removed by Filter: 1,124
21. 2.132 2.387 ↑ 1.1 4,367 3 / 3

Parallel Bitmap Heap Scan on article (cost=368.39..30,705.47 rows=4,876 width=36) (actual time=0.344..2.387 rows=4,367 loops=3)

  • Recheck Cond: ((article_dossier_id = 205) AND (article_etat = 0))
  • Heap Blocks: exact=1,009
22. 0.255 0.255 ↓ 1.1 13,101 1 / 3

Bitmap Index Scan on article_etat_sk (cost=0.00..365.46 rows=11,703 width=0) (actual time=0.766..0.766 rows=13,101 loops=1)

  • Index Cond: ((article_dossier_id = 205) AND (article_etat = 0))
23. 55.933 143.363 ↓ 1.0 324,377 3 / 3

Hash (cost=8,068.18..8,068.18 rows=324,318 width=8) (actual time=143.363..143.363 rows=324,377 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 15,599kB
24. 87.430 87.430 ↓ 1.0 324,377 3 / 3

Seq Scan on articleex _article_articleex__ (cost=0.00..8,068.18 rows=324,318 width=8) (actual time=0.015..87.430 rows=324,377 loops=3)

25. 6.487 6.487 ↑ 1.0 1 9,730 / 3

Index Scan using produit_pk on produit (cost=0.43..6.90 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=9,730)

  • Index Cond: (produit_id = article.article_produit_id)
26. 9.730 9.730 ↑ 1.0 1 9,730 / 3

Index Scan using articleden_ak on articleden (cost=0.43..7.39 rows=1 width=63) (actual time=0.003..0.003 rows=1 loops=9,730)

  • Index Cond: (article.article_id = articleden_article_id)
27. 3.243 3.243 ↑ 1.0 1 9,730 / 3

Index Scan using mesure_pk on mesure (cost=0.29..0.31 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=9,730)

  • Index Cond: (mesure_id = produit.produit_mesure_id)
28. 0.259 0.687 ↓ 1.0 2,307 3 / 3

Hash (cost=53.55..53.55 rows=2,255 width=8) (actual time=0.687..0.687 rows=2,307 loops=3)

  • Buckets: 4,096 Batches: 1 Memory Usage: 123kB
29. 0.428 0.428 ↓ 1.0 2,307 3 / 3

Seq Scan on unite _mesure_unitecontenance__ (cost=0.00..53.55 rows=2,255 width=8) (actual time=0.014..0.428 rows=2,307 loops=3)

30. 2.944 22.786 ↓ 291.7 13,125 3 / 3

Sort (cost=24,185.74..24,185.85 rows=45 width=20) (actual time=22.092..22.786 rows=13,125 loops=3)

  • Sort Key: tarifachatactuel.tarifachatactuel_article_id
  • Sort Method: quicksort Memory: 1,410kB
31. 17.974 19.842 ↓ 291.8 13,131 3 / 3

Bitmap Heap Scan on tarifachatactuel (cost=248.06..24,184.50 rows=45 width=20) (actual time=2.495..19.842 rows=13,131 loops=3)

  • Recheck Cond: (tarifachatactuel_dossier_id = 205)
  • Filter: ((tarifachatactuel_profiltarifachat_id IS NULL) AND tarifachatactuel_principal AND (tarifachatactuel_etablissement_id = 344))
  • Rows Removed by Filter: 14,097
  • Heap Blocks: exact=5,385
32. 1.868 1.868 ↓ 3.7 27,228 3 / 3

Bitmap Index Scan on tarifachatactuel_dossier_sk (cost=0.00..248.05 rows=7,416 width=0) (actual time=1.868..1.868 rows=27,228 loops=3)

  • Index Cond: (tarifachatactuel_dossier_id = 205)
33. 9.730 9.730 ↑ 1.0 1 9,730 / 3

Index Scan using tarifventeactuel_ak on tarifventeactuel (cost=0.56..7.94 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=9,730)

  • Index Cond: ((tarifventeactuel_article_id = article.article_id) AND (tarifventeactuel_dossier_id = article.article_dossier_id) AND (tarifventeactuel_dossier_id = 205) AND (tarifventeactuel_etablissement_id = 344) AND (tarifventeactuel_profiltarif_id IS NULL))
34. 6.487 6.487 ↑ 1.0 1 9,730 / 3

Index Scan using condachat_ak on condachat (cost=0.43..6.54 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=9,730)

  • Index Cond: ((condachat_dossier_id = produit.produit_dossier_id) AND (condachat_produit_id = article.article_produit_id))
  • Filter: condachat_principal
  • Rows Removed by Filter: 0
35. 2.914 15.805 ↓ 546.9 13,125 3 / 3

Sort (cost=24,185.05..24,185.11 rows=24 width=28) (actual time=15.116..15.805 rows=13,125 loops=3)

  • Sort Key: _actuel_profilachat18__.tarifachatactuel_article_id
  • Sort Method: quicksort Memory: 1,410kB
36. 11.598 12.891 ↓ 547.1 13,131 3 / 3

Bitmap Heap Scan on tarifachatactuel _actuel_profilachat18__ (cost=248.06..24,184.50 rows=24 width=28) (actual time=1.812..12.891 rows=13,131 loops=3)

  • Recheck Cond: (tarifachatactuel_dossier_id = 205)
  • Filter: (tarifachatactuel_principal AND (tarifachatactuel_profiltarifachat_id = 18))
  • Rows Removed by Filter: 14,097
  • Heap Blocks: exact=5,385
37. 1.293 1.293 ↓ 3.7 27,228 3 / 3

Bitmap Index Scan on tarifachatactuel_dossier_sk (cost=0.00..248.05 rows=7,416 width=0) (actual time=1.293..1.293 rows=27,228 loops=3)

  • Index Cond: (tarifachatactuel_dossier_id = 205)
38. 1.893 9.763 ↓ 1.0 14,001 3 / 3

Hash (cost=24,370.63..24,370.63 rows=13,662 width=17) (actual time=9.763..9.763 rows=14,001 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 806kB
39. 7.224 7.870 ↓ 1.0 14,001 3 / 3

Bitmap Heap Scan on refachat _actuel_profilachatrefachat18__ (cost=342.31..24,370.63 rows=13,662 width=17) (actual time=0.888..7.870 rows=14,001 loops=3)

  • Recheck Cond: (refachat_dossier_id = 205)
  • Heap Blocks: exact=2,698
40. 0.646 0.646 ↓ 1.0 14,248 3 / 3

Bitmap Index Scan on refachat_dossier_fk (cost=0.00..338.89 rows=13,662 width=0) (actual time=0.646..0.646 rows=14,248 loops=3)

  • Index Cond: (refachat_dossier_id = 205)
41. 1.859 9.093 ↓ 1.0 14,001 3 / 3

Hash (cost=23,559.52..23,559.52 rows=13,875 width=16) (actual time=9.093..9.093 rows=14,001 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 785kB
42. 6.468 7.234 ↓ 1.0 14,001 3 / 3

Bitmap Heap Scan on condachat _actuel_profilachatcondachat18__ (cost=355.96..23,559.52 rows=13,875 width=16) (actual time=0.939..7.234 rows=14,001 loops=3)

  • Recheck Cond: (condachat_dossier_id = 205)
  • Heap Blocks: exact=1,892
43. 0.766 0.766 ↓ 1.0 14,282 3 / 3

Bitmap Index Scan on condachat_dossier_id_sk (cost=0.00..352.49 rows=13,875 width=0) (actual time=0.766..0.766 rows=14,282 loops=3)

  • Index Cond: (condachat_dossier_id = 205)
44. 0.053 0.244 ↑ 1.0 369 3 / 3

Hash (cost=153.08..153.08 rows=385 width=15) (actual time=0.244..0.244 rows=369 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 26kB
45. 0.161 0.191 ↑ 1.0 369 3 / 3

Bitmap Heap Scan on fournisseur _actuel_profilachatfournisseur18__ (cost=11.27..153.08 rows=385 width=15) (actual time=0.037..0.191 rows=369 loops=3)

  • Recheck Cond: (fournisseur_dossier_id = 205)
  • Heap Blocks: exact=38
46. 0.030 0.030 ↓ 1.0 395 3 / 3

Bitmap Index Scan on fournisseur_dossier_id_sk (cost=0.00..11.17 rows=385 width=0) (actual time=0.030..0.030 rows=395 loops=3)

  • Index Cond: (fournisseur_dossier_id = 205)
47. 0.003 0.017 ↑ 1.0 5 3 / 3

Hash (cost=15.99..15.99 rows=5 width=22) (actual time=0.017..0.017 rows=5 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
48. 0.005 0.014 ↑ 1.0 5 3 / 3

Bitmap Heap Scan on profiltaxe _actuel_profilachatprofiltaxe18__ (cost=4.32..15.99 rows=5 width=22) (actual time=0.013..0.014 rows=5 loops=3)

  • Recheck Cond: (profiltaxe_dossier_id = 205)
  • Heap Blocks: exact=1
49. 0.009 0.009 ↑ 1.0 5 3 / 3

Bitmap Index Scan on profiltaxe_dossier_id_sk (cost=0.00..4.31 rows=5 width=0) (actual time=0.009..0.009 rows=5 loops=3)

  • Index Cond: (profiltaxe_dossier_id = 205)
50. 4.174 10.947 ↓ 1.0 13,994 3 / 3

Sort (cost=25,309.07..25,343.22 rows=13,662 width=17) (actual time=10.434..10.947 rows=13,994 loops=3)

  • Sort Key: refachat.refachat_article_id, refachat.refachat_condachat_id
  • Sort Method: quicksort Memory: 1,478kB
51. 6.084 6.773 ↓ 1.0 14,001 3 / 3

Bitmap Heap Scan on refachat (cost=342.31..24,370.63 rows=13,662 width=17) (actual time=0.937..6.773 rows=14,001 loops=3)

  • Recheck Cond: (refachat_dossier_id = 205)
  • Heap Blocks: exact=2,698
52. 0.689 0.689 ↓ 1.0 14,248 3 / 3

Bitmap Index Scan on refachat_dossier_fk (cost=0.00..338.89 rows=13,662 width=0) (actual time=0.689..0.689 rows=14,248 loops=3)

  • Index Cond: (refachat_dossier_id = 205)
53. 2.012 30.835 ↓ 8,146.0 8,146 3 / 3

Sort (cost=65,308.93..65,308.94 rows=1 width=21) (actual time=30.546..30.835 rows=8,146 loops=3)

  • Sort Key: gtin1.gtin_article_id
  • Sort Method: quicksort Memory: 828kB
54. 1.051 28.823 ↓ 8,149.0 8,149 3 / 3

Subquery Scan on gtin1 (cost=65,307.92..65,308.92 rows=1 width=21) (actual time=27.397..28.823 rows=8,149 loops=3)

  • Filter: ((gtin1.index = 1) AND (gtin1.gtin_dossier_id = 205))
  • Rows Removed by Filter: 1,013
55. 2.288 27.772 ↓ 160.7 9,162 3 / 3

Sort (cost=65,307.92..65,308.07 rows=57 width=33) (actual time=27.395..27.772 rows=9,162 loops=3)

  • Sort Key: gtin.gtin_id
  • Sort Method: quicksort Memory: 1,100kB
56. 2.830 25.484 ↓ 160.7 9,162 3 / 3

WindowAgg (cost=65,305.12..65,306.26 rows=57 width=33) (actual time=22.319..25.484 rows=9,162 loops=3)

57. 2.550 22.654 ↓ 160.7 9,162 3 / 3

Sort (cost=65,305.12..65,305.26 rows=57 width=25) (actual time=22.314..22.654 rows=9,162 loops=3)

  • Sort Key: gtin.gtin_article_id, gtin.gtin_id
  • Sort Method: quicksort Memory: 1,100kB
58. 5.177 20.104 ↓ 160.7 9,162 3 / 3

Hash Join (cost=33,431.31..65,303.46 rows=57 width=25) (actual time=9.266..20.104 rows=9,162 loops=3)

  • Hash Cond: (gtin.gtin_article_id = article_1.article_id)
  • Join Filter: ((gtin.gtin_code)::text <> (article_1.article_gtin)::text)
  • Rows Removed by Join Filter: 13,131
59. 5.894 7.035 ↓ 1.6 22,293 3 / 3

Bitmap Heap Scan on gtin (cost=341.18..32,008.90 rows=13,516 width=25) (actual time=1.359..7.035 rows=22,293 loops=3)

  • Recheck Cond: (gtin_dossier_id = 205)
  • Heap Blocks: exact=2,194
60. 1.141 1.141 ↓ 1.6 22,293 3 / 3

Bitmap Index Scan on gtin_article_sk (cost=0.00..337.80 rows=13,516 width=0) (actual time=1.141..1.141 rows=22,293 loops=3)

  • Index Cond: (gtin_dossier_id = 205)
61. 1.720 7.892 ↓ 1.0 13,131 3 / 3

Hash (cost=32,929.26..32,929.26 rows=12,869 width=21) (actual time=7.892..7.892 rows=13,131 loops=3)

  • Buckets: 16,384 Batches: 1 Memory Usage: 847kB
62. 5.485 6.172 ↓ 1.0 13,131 3 / 3

Bitmap Heap Scan on article article_1 (cost=372.16..32,929.26 rows=12,869 width=21) (actual time=0.870..6.172 rows=13,131 loops=3)

  • Recheck Cond: (article_dossier_id = 205)
  • Heap Blocks: exact=1,855
63. 0.687 0.687 ↓ 1.0 13,131 3 / 3

Bitmap Index Scan on article_etat_sk (cost=0.00..368.95 rows=12,869 width=0) (actual time=0.687..0.687 rows=13,131 loops=3)

  • Index Cond: (article_dossier_id = 205)
Planning time : 15.867 ms