explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BTbi

Settings
# exclusive inclusive rows x rows loops node
1. 189.635 12,405.288 ↓ 3,422.1 58,175 1

Sort (cost=420,152.47..420,152.52 rows=17 width=460) (actual time=12,399.022..12,405.288 rows=58,175 loops=1)

  • Sort Key: article.article_tag, article.article_id
  • Sort Method: external merge Disk: 9,568kB
2. 25.321 12,215.653 ↓ 3,422.1 58,175 1

Nested Loop Left Join (cost=141,993.34..420,152.13 rows=17 width=460) (actual time=1,951.512..12,215.653 rows=58,175 loops=1)

3. 34.382 12,132.157 ↓ 3,422.1 58,175 1

Nested Loop Left Join (cost=141,992.92..420,141.23 rows=17 width=199) (actual time=1,951.497..12,132.157 rows=58,175 loops=1)

  • Join Filter: (condachatmodele.condachat_id = refachatmodele.refachat_condachat_id)
4. 45.775 12,039.600 ↓ 3,422.1 58,175 1

Nested Loop Left Join (cost=141,992.49..420,121.94 rows=17 width=203) (actual time=1,951.478..12,039.600 rows=58,175 loops=1)

5. 21.690 11,935.650 ↓ 3,422.1 58,175 1

Hash Left Join (cost=141,992.07..420,107.92 rows=17 width=203) (actual time=1,951.461..11,935.650 rows=58,175 loops=1)

  • Hash Cond: (article.article_produit_id = articlemodele.article_produit_id)
  • Join Filter: ((article.article_id <> articlemodele.article_id) AND (article.article_type = 20))
6. 172.349 11,587.740 ↓ 3,422.1 58,175 1

Hash Join (cost=62,534.31..340,634.28 rows=17 width=178) (actual time=1,624.949..11,587.740 rows=58,175 loops=1)

  • Hash Cond: (article.article_id = datemodif.datemodif_tableid)
7. 118.893 10,817.143 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,928.66..335,596.87 rows=34,199 width=182) (actual time=360.207..10,817.143 rows=584,113 loops=1)

8. 0.000 9,530.024 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,928.23..314,426.96 rows=34,199 width=177) (actual time=360.183..9,530.024 rows=584,113 loops=1)

9. 54.319 7,227.320 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,927.80..293,257.06 rows=34,199 width=172) (actual time=359.540..7,227.320 rows=584,113 loops=1)

  • Join Filter: (condachat.condachat_id = refachat.refachat_condachat_id)
  • Rows Removed by Join Filter: 70
10. 150.313 6,004.775 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,927.38..273,519.56 rows=34,199 width=164) (actual time=359.294..6,004.775 rows=584,113 loops=1)

  • Join Filter: (condachat.condachat_dossier_id = produit.produit_dossier_id)
11. 511.944 4,686.236 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,926.95..255,757.27 rows=34,199 width=164) (actual time=358.862..4,686.236 rows=584,113 loops=1)

12. 436.326 3,590.179 ↓ 17.1 584,113 1

Nested Loop Left Join (cost=57,926.53..237,653.38 rows=34,199 width=135) (actual time=358.449..3,590.179 rows=584,113 loops=1)

13. 169.802 1,401.514 ↓ 17.1 584,113 1

Hash Join (cost=57,926.10..134,498.09 rows=34,199 width=66) (actual time=358.174..1,401.514 rows=584,113 loops=1)

  • Hash Cond: (article.article_produit_id = produit.produit_id)
14. 877.777 933.222 ↑ 1.1 584,113 1

Bitmap Heap Scan on article (cost=13,890.72..82,569.32 rows=625,219 width=58) (actual time=59.407..933.222 rows=584,113 loops=1)

  • Recheck Cond: (article_dossier_id = 189)
  • Filter: ((article_type = ANY('{0,20}'::integer[])) AND (article_etat = ANY ('{0,1,2,100}'::integer[])) AND (lower(unaccent((article_tag)::text)) !~~ 'art%'::text))
  • Rows Removed by Filter: 75,575
  • Heap Blocks: exact=30,233
15. 55.445 55.445 ↓ 1.4 935,872 1

Bitmap Index Scan on article_catalogue_sk (cost=0.00..13,734.41 rows=663,731 width=0) (actual time=55.445..55.445 rows=935,872 loops=1)

  • Index Cond: (article_dossier_id = 189)
16. 16.793 298.490 ↑ 1.1 75,502 1

Hash (cost=43,025.09..43,025.09 rows=80,823 width=8) (actual time=298.490..298.490 rows=75,502 loops=1)

  • Buckets: 131,072 Batches: 1 Memory Usage: 3,974kB
17. 216.716 281.697 ↑ 1.1 75,502 1

Bitmap Heap Scan on produit (cost=2,022.81..43,025.09 rows=80,823 width=8) (actual time=65.413..281.697 rows=75,502 loops=1)

  • Recheck Cond: (produit_dossier_id = 189)
  • Heap Blocks: exact=4,371
18. 64.981 64.981 ↓ 1.1 89,134 1

Bitmap Index Scan on produit_dossier_id_sk (cost=0.00..2,002.60 rows=80,823 width=0) (actual time=64.981..64.981 rows=89,134 loops=1)

  • Index Cond: (produit_dossier_id = 189)
19. 1,752.339 1,752.339 ↑ 1.0 1 584,113

Index Scan using articleden_ak on articleden (cost=0.43..3.02 rows=1 width=77) (actual time=0.003..0.003 rows=1 loops=584,113)

  • Index Cond: ((article.article_id = articleden_article_id) AND (articleden_dossier_id = article.article_dossier_id) AND (articleden_dossier_id = 189))
20. 584.113 584.113 ↑ 1.0 1 584,113

Index Scan using articleex_pk on articleex _article_articleex__ (cost=0.42..0.53 rows=1 width=33) (actual time=0.001..0.001 rows=1 loops=584,113)

  • Index Cond: (articleex_id = article.article_articleex_id)
21. 1,168.226 1,168.226 ↑ 1.0 1 584,113

Index Scan using condachat_ak on condachat (cost=0.42..0.51 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=584,113)

  • Index Cond: ((condachat_dossier_id = 189) AND (condachat_produit_id = article.article_produit_id))
  • Filter: condachat_principal
  • Rows Removed by Filter: 0
22. 1,168.226 1,168.226 ↑ 1.0 1 584,113

Index Scan using refachat_ak on refachat (cost=0.42..0.56 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=584,113)

  • Index Cond: (refachat_article_id = article.article_id)
  • Filter: ((refachat_dossier_id = 189) AND (refachat_dossier_id = article.article_dossier_id))
23. 2,336.452 2,336.452 ↑ 1.0 1 584,113

Index Scan using artgrilleval_article_id_sk on artgrilleval agv1 (cost=0.43..0.61 rows=1 width=13) (actual time=0.003..0.004 rows=1 loops=584,113)

  • Index Cond: ((artgrilleval_dossier_id = article.article_dossier_id) AND (artgrilleval_dossier_id = 189) AND (artgrilleval_article_id = article.article_id))
  • Filter: (artgrilleval_ordre = 1)
  • Rows Removed by Filter: 1
24. 1,168.226 1,168.226 ↑ 1.0 1 584,113

Index Scan using artgrilleval_article_id_sk on artgrilleval agv2 (cost=0.43..0.61 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=584,113)

  • Index Cond: ((artgrilleval_dossier_id = article.article_dossier_id) AND (artgrilleval_dossier_id = 189) AND (artgrilleval_article_id = article.article_id))
  • Filter: (artgrilleval_ordre = 2)
  • Rows Removed by Filter: 1
25. 14.544 598.248 ↓ 43.2 59,596 1

Hash (cost=4,588.42..4,588.42 rows=1,379 width=8) (actual time=598.248..598.248 rows=59,596 loops=1)

  • Buckets: 65,536 (originally 2048) Batches: 1 (originally 1) Memory Usage: 2,840kB
26. 583.704 583.704 ↓ 43.2 59,596 1

Index Scan using datemodif_datemodif_sk on datemodif (cost=0.56..4,588.42 rows=1,379 width=8) (actual time=1.257..583.704 rows=59,596 loops=1)

  • Index Cond: ((datemodif_dossier_id = 189) AND ((datemodif_table)::text = 'article'::text) AND (datemodif_datemodif >= '2020-02-06 16:49:56.943911'::timestamp without time zone))
27. 17.813 326.220 ↑ 1.1 100,768 1

Hash (cost=78,106.05..78,106.05 rows=108,137 width=29) (actual time=326.220..326.220 rows=100,768 loops=1)

  • Buckets: 131,072 Batches: 1 Memory Usage: 6,415kB
28. 308.407 308.407 ↑ 1.1 100,768 1

Seq Scan on article articlemodele (cost=0.00..78,106.05 rows=108,137 width=29) (actual time=0.006..308.407 rows=100,768 loops=1)

  • Filter: (article_type = 10)
  • Rows Removed by Filter: 2,109,613
29. 58.175 58.175 ↑ 1.0 1 58,175

Index Scan using condachat_ak on condachat condachatmodele (cost=0.42..0.81 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=58,175)

  • Index Cond: ((condachat_dossier_id = articlemodele.article_dossier_id) AND (condachat_produit_id = articlemodele.article_produit_id))
  • Filter: condachat_principal
30. 58.175 58.175 ↑ 1.0 1 58,175

Index Scan using refachat_ak on refachat refachatmodele (cost=0.42..1.12 rows=1 width=20) (actual time=0.001..0.001 rows=1 loops=58,175)

  • Index Cond: (refachat_article_id = articlemodele.article_id)
  • Filter: (refachat_dossier_id = articlemodele.article_dossier_id)
31. 58.175 58.175 ↓ 0.0 0 58,175

Index Scan using ecomproduit_produit_ak on ecomproduit (cost=0.42..0.64 rows=1 width=269) (actual time=0.001..0.001 rows=0 loops=58,175)

  • Index Cond: (ecomproduit_produit_id = produit.produit_id)