explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2Xbw

Settings
# exclusive inclusive rows x rows loops node
1. 90.745 519.835 ↓ 7,096.0 7,096 1

Nested Loop (cost=532.38..1,050.47 rows=1 width=154) (actual time=40.285..519.835 rows=7,096 loops=1)

  • Join Filter: (public.t_gfr_vente.produit_id = public.t_gfr_produit.produit_id)
2. 35.760 261.507 ↓ 12,891.0 12,891 1

Nested Loop (cost=532.38..1,049.22 rows=1 width=146) (actual time=40.248..261.507 rows=12,891 loops=1)

3. 84.876 127.823 ↓ 12,240.5 24,481 1

Hash Join (cost=532.38..1,048.65 rows=2 width=150) (actual time=39.682..127.823 rows=24,481 loops=1)

  • Hash Cond: ((public.t_gfr_vente.num_contrat)::text = (public.t_gfr_vente.num_contrat)::text)
4. 3.601 3.601 ↑ 1.0 12,891 1

Seq Scan on t_gfr_vente (cost=0.00..467.91 rows=12,891 width=29) (actual time=0.031..3.601 rows=12,891 loops=1)

5. 23.773 39.346 ↓ 12,891.0 12,891 1

Hash (cost=532.37..532.37 rows=1 width=134) (actual time=39.346..39.346 rows=12,891 loops=1)

  • Buckets: 1024 Batches: 4 (originally 1) Memory Usage: 1025kB
6. 15.573 15.573 ↓ 12,891.0 12,891 1

Seq Scan on t_gfr_vente (cost=0.00..532.37 rows=1 width=134) (actual time=0.014..15.573 rows=12,891 loops=1)

  • Filter: ((statut_action = statut_action) AND (statut_facture = statut_facture))
7. 97.924 97.924 ↑ 1.0 1 24,481

Index Scan using pk_t_gfr_produit3 on t_gfr_produit (cost=0.00..0.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=24,481)

  • Index Cond: (produit_id = public.t_gfr_vente.produit_id)
  • Filter: ((code_source)::text = ANY ('{D,W}'::text[]))
8. 167.583 167.583 ↓ 6.0 12 12,891

Seq Scan on t_gfr_produit (cost=0.00..1.23 rows=2 width=12) (actual time=0.004..0.013 rows=12 loops=12,891)

  • Filter: ((code_source)::text = ANY ('{U,W}'::text[]))