explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dW6o

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 239.374 ↑ 1.0 100 1

Limit (cost=224,970.58..224,982.24 rows=100 width=128) (actual time=239.298..239.374 rows=100 loops=1)

2. 8.867 239.366 ↑ 90.3 100 1

Gather Merge (cost=224,970.58..226,024.62 rows=9,034 width=128) (actual time=239.297..239.366 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.844 230.499 ↑ 16.4 276 3 / 3

Sort (cost=223,970.55..223,981.84 rows=4,517 width=128) (actual time=230.484..230.499 rows=276 loops=3)

  • Sort Key: article.article_ecommerce DESC, article.article_id
  • Sort Method: quicksort Memory: 1,450kB
4. 1.485 227.655 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=158,069.99..223,696.34 rows=4,517 width=128) (actual time=185.161..227.655 rows=3,243 loops=3)

  • Hash Cond: ((article.article_dossier_id = refachat.refachat_dossier_id) AND (condachat.condachat_id = refachat.refachat_condachat_id) AND (article.article_id = refachat.refachat_article_id))
5. 2.705 215.427 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=133,460.28..199,005.88 rows=4,517 width=131) (actual time=174.405..215.427 rows=3,243 loops=3)

6. 2.543 206.235 ↑ 1.4 3,243 3 / 3

Nested Loop Left Join (cost=133,459.85..169,412.02 rows=4,517 width=131) (actual time=174.388..206.235 rows=3,243 loops=3)

7. 2.492 177.745 ↑ 1.4 3,243 3 / 3

Merge Left Join (cost=133,459.29..133,482.12 rows=4,517 width=123) (actual time=174.302..177.745 rows=3,243 loops=3)

  • Merge Cond: (article.article_id = tarifachatactuel.tarifachatactuel_article_id)
  • Join Filter: (tarifachatactuel.tarifachatactuel_dossier_id = article.article_dossier_id)
8. 1.579 152.760 ↑ 1.4 3,243 3 / 3

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

  • Sort Key: article.article_id
  • Sort Method: quicksort Memory: 1,442kB
9. 0.574 151.181 ↑ 1.4 3,243 3 / 3

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

  • Hash Cond: (mesure.mesure_unitecontenance_id = _mesure_unitecontenance__.unite_id)
10. 1.325 150.066 ↑ 1.4 3,243 3 / 3

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

11. 1.941 145.498 ↑ 1.4 3,243 3 / 3

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

12. 2.155 133.827 ↑ 1.4 3,243 3 / 3

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

13. 3.047 125.185 ↑ 1.4 3,243 3 / 3

Hash Left Join (cost=12,490.54..42,901.38 rows=4,517 width=40) (actual time=121.162..125.185 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
14. 1.929 2.176 ↑ 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.351..2.176 rows=4,367 loops=3)

  • Recheck Cond: ((article_dossier_id = 205) AND (article_etat = 0))
  • Heap Blocks: exact=1,184
15. 0.247 0.247 ↓ 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.742..0.742 rows=13,101 loops=1)

  • Index Cond: ((article_dossier_id = 205) AND (article_etat = 0))
16. 46.827 119.962 ↓ 1.0 324,377 3 / 3

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

  • Buckets: 524,288 Batches: 1 Memory Usage: 15,599kB
17. 73.135 73.135 ↓ 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.022..73.135 rows=324,377 loops=3)

18. 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)
19. 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)
20. 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)
21. 0.207 0.541 ↓ 1.0 2,307 3 / 3

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

  • Buckets: 4,096 Batches: 1 Memory Usage: 123kB
22. 0.334 0.334 ↓ 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.013..0.334 rows=2,307 loops=3)

23. 2.795 22.493 ↓ 291.7 13,125 3 / 3

Sort (cost=24,185.74..24,185.85 rows=45 width=8) (actual time=21.775..22.493 rows=13,125 loops=3)

  • Sort Key: tarifachatactuel.tarifachatactuel_article_id
  • Sort Method: quicksort Memory: 1,000kB
24. 18.164 19.698 ↓ 291.8 13,131 3 / 3

Bitmap Heap Scan on tarifachatactuel (cost=248.06..24,184.50 rows=45 width=8) (actual time=2.053..19.698 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
25. 1.534 1.534 ↓ 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.534..1.534 rows=27,228 loops=3)

  • Index Cond: (tarifachatactuel_dossier_id = 205)
26. 25.947 25.947 ↑ 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.007..0.008 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))
27. 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
28. 2.213 10.743 ↓ 1.0 14,001 3 / 3

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

  • Buckets: 16,384 Batches: 1 Memory Usage: 839kB
29. 7.837 8.530 ↓ 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.948..8.530 rows=14,001 loops=3)

  • Recheck Cond: (refachat_dossier_id = 205)
  • Heap Blocks: exact=2,698
30. 0.693 0.693 ↓ 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.693..0.693 rows=14,248 loops=3)

  • Index Cond: (refachat_dossier_id = 205)
Planning time : 31.646 ms