explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6nS7

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 10.592 297.416 ↓ 7,096.0 7,096 1

Nested Loop (cost=532.38..1,057.51 rows=1 width=154) (actual time=41.194..297.416 rows=7,096 loops=1)

2. 16.180 235.260 ↓ 12,891.0 12,891 1

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

3. 77.246 121.156 ↓ 12,240.5 24,481 1

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

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

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

5. 24.499 40.232 ↓ 12,891.0 12,891 1

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

  • Buckets: 1024 Batches: 4 (originally 1) Memory Usage: 1025kB
6. 15.733 15.733 ↓ 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.733 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. 51.564 51.564 ↑ 1.0 1 12,891

Index Scan using pk_t_gfr_produit3 on t_gfr_produit (cost=0.00..8.27 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=12,891)

  • Index Cond: (produit_id = public.t_gfr_vente.produit_id)
  • Filter: ((code_source)::text = ANY ('{U,W}'::text[]))