explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NuqQ : Optimization for: plan #9FgM

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.353 2,458.462 ↑ 1.0 1 1

Aggregate (cost=2,000,209.98..2,000,209.99 rows=1 width=8) (actual time=2,458.462..2,458.462 rows=1 loops=1)

2. 6.545 2,456.109 ↓ 2.7 23,331 1

Hash Join (cost=478,850.89..2,000,188.63 rows=8,539 width=0) (actual time=444.032..2,456.109 rows=23,331 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
3. 24.671 2,449.457 ↑ 1.0 25,567 1

Nested Loop (cost=478,834.73..1,999,991.09 rows=25,618 width=8) (actual time=443.915..2,449.457 rows=25,567 loops=1)

4. 425.590 2,373.652 ↑ 1.0 25,567 1

Hash Join (cost=478,834.30..1,953,886.21 rows=25,730 width=8) (actual time=443.898..2,373.652 rows=25,567 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
5. 1,519.187 1,736.209 ↓ 1.1 1,836,450 1

Bitmap Heap Scan on vcligne (cost=68,266.30..1,519,820.90 rows=1,647,201 width=12) (actual time=231.222..1,736.209 rows=1,836,450 loops=1)

  • Recheck Cond: ((vcligne_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcligne_date <= '2019-09-25 23:59:59'::timestamp without time zone) AND (vcligne_dossier_id = 15))
  • Rows Removed by Index Recheck: 216,124
  • 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,175 lossy=133,330
6. 217.022 217.022 ↓ 1.2 1,899,435 1

Bitmap Index Scan on vcligne_date_sk (cost=0.00..67,854.50 rows=1,648,629 width=0) (actual time=217.022..217.022 rows=1,899,435 loops=1)

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

Hash (cost=406,465.92..406,465.92 rows=250,007 width=4) (actual time=211.853..211.853 rows=251,272 loops=1)

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

Index Scan using vcarticle_vcclassif2_sk on vcarticle (cost=0.56..406,465.92 rows=250,007 width=4) (actual time=0.019..166.059 rows=251,272 loops=1)

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

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

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

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

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

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

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