explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bN2q : Optimization for: plan #6nS7

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 13.392 211.644 ↓ 7,096.0 7,096 1

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

2. 23.736 172.470 ↓ 12,891.0 12,891 1

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

3. 54.640 99.772 ↓ 12,240.5 24,481 1

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

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

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

5. 25.452 41.521 ↓ 12,891.0 12,891 1

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

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

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

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

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

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