explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tDED

Settings
# exclusive inclusive rows x rows loops node
1. 16.887 101,966.945 ↑ 3,163.6 7 1

Gather (cost=2,281.82..1,026,820.77 rows=22,145 width=166) (actual time=101,960.290..101,966.945 rows=7 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
2. 0.000 101,950.058 ↑ 3,164.0 1 8

Hash Left Join (cost=1,281.82..1,023,606.27 rows=3,164 width=166) (actual time=51,046.810..101,950.058 rows=1 loops=8)

  • Hash Cond: (st.specialite_id = spe.id)
3. 0.006 101,950.028 ↑ 3,164.0 1 8

Nested Loop Left Join (cost=1,280.01..1,023,595.18 rows=3,164 width=159) (actual time=51,046.781..101,950.028 rows=1 loops=8)

4. 0.000 101,949.994 ↑ 1,655.0 1 8

Hash Left Join (cost=1,279.11..1,020,193.19 rows=1,655 width=137) (actual time=51,046.766..101,949.994 rows=1 loops=8)

  • Hash Cond: (p.casier_id = c.id)
5. 0.007 101,949.968 ↑ 1,655.0 1 8

Hash Left Join (cost=1,277.93..1,020,185.80 rows=1,655 width=133) (actual time=51,046.740..101,949.968 rows=1 loops=8)

  • Hash Cond: (p.produit_type_etat_id = etat.id)
6. 0.000 101,949.940 ↑ 1,655.0 1 8

Hash Left Join (cost=1,276.63..1,020,161.74 rows=1,655 width=123) (actual time=51,046.715..101,949.940 rows=1 loops=8)

  • Hash Cond: (pt.produit_marque_id = m.id)
7. 0.000 101,949.809 ↑ 1,655.0 1 8

Hash Left Join (cost=1,259.87..1,020,140.62 rows=1,655 width=112) (actual time=51,046.585..101,949.809 rows=1 loops=8)

  • Hash Cond: (pt.produit_fournisseur_id = f.id)
8. 0.203 101,949.554 ↑ 1,655.0 1 8

Hash Join (cost=1,222.16..1,020,098.55 rows=1,655 width=102) (actual time=51,046.332..101,949.554 rows=1 loops=8)

  • Hash Cond: (p.produit_type_id = pt.id)
9. 101,939.763 101,939.763 ↑ 1,915.0 2 8

Parallel Seq Scan on produit p (cost=0.00..1,018,845.47 rows=3,830 width=30) (actual time=27,826.934..101,939.763 rows=2 loops=8)

  • Filter: ((peremption <= 191130) AND (produit_type_etat_id = 3))
  • Rows Removed by Filter: 4672391
10. 2.375 9.588 ↓ 1.0 7,488 8

Hash (cost=1,128.80..1,128.80 rows=7,469 width=76) (actual time=9.588..9.588 rows=7,488 loops=8)

  • Buckets: 8192 Batches: 1 Memory Usage: 862kB
11. 3.121 7.213 ↓ 1.0 7,488 8

Nested Loop (cost=84.57..1,128.80 rows=7,469 width=76) (actual time=0.738..7.213 rows=7,488 loops=8)

12. 0.047 0.047 ↑ 1.0 1 8

Seq Scan on produit_famille pf (cost=0.00..1.18 rows=1 width=18) (actual time=0.043..0.047 rows=1 loops=8)

  • Filter: (id = 26)
  • Rows Removed by Filter: 14
13. 3.487 4.045 ↓ 1.0 7,488 8

Bitmap Heap Scan on produit_type pt (cost=84.57..1,052.93 rows=7,469 width=62) (actual time=0.685..4.045 rows=7,488 loops=8)

  • Recheck Cond: (produit_famille_id = 26)
  • Heap Blocks: exact=780
14. 0.558 0.558 ↓ 1.0 7,520 8

Bitmap Index Scan on produit_type_famille_idx (cost=0.00..82.70 rows=7,469 width=0) (actual time=0.558..0.558 rows=7,520 loops=8)

  • Index Cond: (produit_famille_id = 26)
15. 0.132 0.379 ↑ 1.0 698 5

Hash (cost=28.98..28.98 rows=698 width=18) (actual time=0.379..0.379 rows=698 loops=5)

16. 0.247 0.247 ↑ 1.0 698 5

Seq Scan on produit_fournisseur f (cost=0.00..28.98 rows=698 width=18) (actual time=0.044..0.247 rows=698 loops=5)

17. 0.083 0.190 ↓ 1.0 437 5

Hash (cost=11.34..11.34 rows=434 width=19) (actual time=0.190..0.190 rows=437 loops=5)

18. 0.107 0.107 ↓ 1.0 437 5

Seq Scan on produit_marque m (cost=0.00..11.34 rows=434 width=19) (actual time=0.020..0.107 rows=437 loops=5)

19. 0.004 0.021 ↑ 1.0 1 5

Hash (cost=1.29..1.29 rows=1 width=18) (actual time=0.021..0.021 rows=1 loops=5)

20. 0.017 0.017 ↑ 1.0 1 5

Seq Scan on produit_type_etat etat (cost=0.00..1.29 rows=1 width=18) (actual time=0.015..0.017 rows=1 loops=5)

  • Filter: (id = 3)
  • Rows Removed by Filter: 22
21. 0.006 0.028 ↑ 1.0 4 5

Hash (cost=1.12..1.12 rows=4 width=12) (actual time=0.028..0.028 rows=4 loops=5)

22. 0.022 0.022 ↑ 1.0 4 5

Seq Scan on casier c (cost=0.00..1.12 rows=4 width=12) (actual time=0.020..0.022 rows=4 loops=5)

  • Filter: (visible = 1)
  • Rows Removed by Filter: 6
23. 0.007 0.028 ↓ 0.0 0 7

Bitmap Heap Scan on stock st (cost=0.90..2.04 rows=2 width=30) (actual time=0.028..0.028 rows=0 loops=7)

  • Recheck Cond: ((id = c.stock_id) OR (id = p.stock_id))
  • Filter: (visible = 1)
24. 0.005 0.021 ↓ 0.0 0 7

BitmapOr (cost=0.90..0.90 rows=2 width=0) (actual time=0.021..0.021 rows=0 loops=7)

25. 0.002 0.002 ↓ 0.0 0 7

Bitmap Index Scan on stock_idx (cost=0.00..0.70 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=7)

  • Index Cond: (id = c.stock_id)
26. 0.014 0.014 ↓ 0.0 0 7

Bitmap Index Scan on stock_idx (cost=0.00..0.15 rows=1 width=0) (actual time=0.014..0.014 rows=0 loops=7)

  • Index Cond: (id = p.stock_id)
27. 0.008 0.031 ↑ 1.0 36 5

Hash (cost=1.36..1.36 rows=36 width=15) (actual time=0.031..0.031 rows=36 loops=5)

28. 0.023 0.023 ↑ 1.0 36 5

Seq Scan on specialite spe (cost=0.00..1.36 rows=36 width=15) (actual time=0.019..0.023 rows=36 loops=5)