explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 61Rg : Optimization for: Optimization for: plan #9FgM; plan #NuqQ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 2.448 2,899.381 ↑ 1.0 1 1

Aggregate (cost=2,000,297.17..2,000,297.18 rows=1 width=8) (actual time=2,899.381..2,899.381 rows=1 loops=1)

2. 6.629 2,896.933 ↓ 2.7 23,369 1

Hash Join (cost=479,320.79..2,000,275.89 rows=8,512 width=0) (actual time=902.428..2,896.933 rows=23,369 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
3. 25.433 2,890.136 ↓ 1.0 25,605 1

Nested Loop (cost=479,304.64..2,000,078.94 rows=25,536 width=8) (actual time=902.245..2,890.136 rows=25,605 loops=1)

4. 444.085 2,813.493 ↑ 1.0 25,605 1

Hash Join (cost=479,304.20..1,954,011.87 rows=25,648 width=8) (actual time=902.231..2,813.493 rows=25,605 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
5. 1,484.676 2,162.441 ↓ 1.1 1,838,615 1

Bitmap Heap Scan on vcligne (cost=68,721.18..1,520,002.07 rows=1,641,946 width=12) (actual time=694.423..2,162.441 rows=1,838,615 loops=1)

  • Recheck Cond: ((vcligne_dossier_id = 15) AND (vcligne_datec >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcligne_datec <= '2019-09-25 23:59:59'::timestamp without time zone))
  • Rows Removed by Index Recheck: 214,660
  • Filter: ((vcligne_typelotcalc)::text = ANY ('{"Article simple","Article lot détail","Article assemblé détail"}'::text[]))
  • Rows Removed by Filter: 184
  • Heap Blocks: exact=71,323 lossy=133,307
6. 677.765 677.765 ↓ 1.2 1,901,786 1

Bitmap Index Scan on vcligne_datec_sk (cost=0.00..68,310.70 rows=1,643,371 width=0) (actual time=677.765..677.765 rows=1,901,786 loops=1)

  • Index Cond: ((vcligne_dossier_id = 15) AND (vcligne_datec >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcligne_datec <= '2019-09-25 23:59:59'::timestamp without time zone))
7. 45.662 206.967 ↓ 1.0 251,274 1

Hash (cost=406,480.84..406,480.84 rows=250,014 width=4) (actual time=206.967..206.967 rows=251,274 loops=1)

  • Buckets: 262,144 Batches: 2 Memory Usage: 6,475kB
8. 161.305 161.305 ↓ 1.0 251,274 1

Index Scan using vcarticle_vcclassif2_sk on vcarticle (cost=0.56..406,480.84 rows=250,014 width=4) (actual time=0.024..161.305 rows=251,274 loops=1)

  • Index Cond: ((vcarticle_dossier_id = 15) AND ((vcarticle_vcclassif2)::text = 'COUVERT COULEUR'::text))
9. 51.210 51.210 ↑ 1.0 1 25,605

Index Scan using vcentete_pk on vcentete (cost=0.43..1.79 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=25,605)

  • Index Cond: (vcentete_id = vcligne.vcligne_vcentete_id)
  • Filter: (vcentete_dossier_id = 15)
10. 0.019 0.168 ↓ 1.0 108 1

Hash (cost=14.81..14.81 rows=107 width=8) (actual time=0.168..0.168 rows=108 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
11. 0.149 0.149 ↓ 1.0 108 1

Seq Scan on adhetablissement (cost=0.00..14.81 rows=107 width=8) (actual time=0.012..0.149 rows=108 loops=1)

  • Filter: ((adhetablissement_dossier_id = 15) AND ((adhetablissement_enseignelib)::text = 'Ambiance & Styles'::text))
  • Rows Removed by Filter: 218
Planning time : 0.859 ms