explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VfnW : Optimization for: Optimization for: Optimization for: plan #6nS7; plan #bN2q; plan #ihkG

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 10.126 245.226 ↓ 7,096.0 7,096 1

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

2. 18.355 196.427 ↓ 12,891.0 12,891 1

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

3. 62.977 104.629 ↓ 12,240.5 24,481 1

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

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

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

5. 23.118 38.045 ↓ 12,891.0 12,891 1

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

  • Buckets: 1024 Batches: 4 (originally 1) Memory Usage: 1025kB
6. 14.927 14.927 ↓ 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..14.927 rows=12,891 loops=1)

  • Filter: ((statut_action = statut_action) AND (statut_facture = statut_facture))
7. 73.443 73.443 ↑ 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.003..0.003 rows=1 loops=24,481)

  • Index Cond: (produit_id = public.t_gfr_vente.produit_id)
  • Filter: ((code_source)::text = ANY ('{D,W}'::text[]))
8. 38.673 38.673 ↑ 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.003 rows=1 loops=12,891)

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