explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Gubf : SLOW

Settings
# exclusive inclusive rows x rows loops node
1. 4.589 6,262.655 ↑ 1.0 1 1

Aggregate (cost=73.18..73.19 rows=1 width=4) (actual time=6,262.655..6,262.655 rows=1 loops=1)

2. 74.013 6,258.066 ↓ 22,674.0 22,674 1

Nested Loop (cost=0.97..73.18 rows=1 width=4) (actual time=920.912..6,258.066 rows=22,674 loops=1)

  • Join Filter: ((caracteris2_.id_lieustockage)::text = (lieustocka3_.id)::text)
  • Rows Removed by Join Filter: 748242
3. 0.065 0.065 ↓ 34.0 34 1

Seq Scan on dm5_lieustockage lieustocka3_ (cost=0.00..1.44 rows=1 width=138) (actual time=0.004..0.065 rows=34 loops=1)

  • Filter: ((id_etablissement)::text = ($2)::text)
  • Rows Removed by Filter: 1
4. 1,550.536 6,183.988 ↓ 2,267.4 22,674 34

Nested Loop (cost=0.97..71.62 rows=10 width=37) (actual time=0.020..181.882 rows=22,674 loops=34)

5. 2,029.800 3,862.536 ↓ 2,267.4 22,674 34

Nested Loop (cost=0.83..69.94 rows=10 width=37) (actual time=0.016..113.604 rows=22,674 loops=34)

6. 212.364 212.364 ↓ 1,191.5 23,829 34

Index Scan using x_dm5_caracteristiquearticlestock_00 on dm5_caracteristiquearticlestock caracteris1_ (cost=0.42..20.99 rows=20 width=33) (actual time=0.009..6.246 rows=23,829 loops=34)

  • Index Cond: ((id_article)::text = ($1)::text)
7. 1,620.372 1,620.372 ↑ 1.0 1 810,186

Index Scan using x_dm5_quantitestock_00 on dm5_quantitestock quantitest0_ (cost=0.42..2.44 rows=1 width=70) (actual time=0.002..0.002 rows=1 loops=810,186)

  • Index Cond: ((id_caracteristiquearticlestock)::text = (caracteris1_.id)::text)
  • Filter: ((datefinvalidite IS NULL) AND (quantite_valeur <> '0'::numeric))
  • Rows Removed by Filter: 0
8. 770.916 770.916 ↑ 1.0 1 770,916

Index Scan using dm5_caracteristiquelieustock_pkey on dm5_caracteristiquelieustock caracteris2_ (cost=0.14..0.16 rows=1 width=66) (actual time=0.001..0.001 rows=1 loops=770,916)

  • Index Cond: ((id)::text = (quantitest0_.id_caracteristiquelieustock)::text)