explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9FgM

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.666 9,212.187 ↑ 1.0 1 1

Aggregate (cost=2,638,896.45..2,638,896.46 rows=1 width=8) (actual time=9,212.187..9,212.187 rows=1 loops=1)

2. 7.343 9,209.521 ↓ 2.7 23,331 1

Hash Join (cost=1,117,539.42..2,638,875.10 rows=8,539 width=0) (actual time=6,965.242..9,209.521 rows=23,331 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
3. 22.670 9,201.970 ↑ 1.0 25,567 1

Nested Loop (cost=1,117,523.27..2,638,677.56 rows=25,618 width=8) (actual time=6,965.006..9,201.970 rows=25,567 loops=1)

4. 470.006 9,102.599 ↑ 1.0 25,567 1

Hash Join (cost=1,117,522.84..2,592,572.74 rows=25,730 width=8) (actual time=6,964.986..9,102.599 rows=25,567 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
5. 1,682.197 1,927.611 ↓ 1.1 1,836,288 1

Bitmap Heap Scan on vcligne (cost=68,262.30..1,519,816.90 rows=1,647,201 width=12) (actual time=259.151..1,927.611 rows=1,836,288 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,160 lossy=133,330
6. 245.414 245.414 ↓ 1.2 1,899,273 1

Bitmap Index Scan on vcligne_date_sk (cost=0.00..67,850.50 rows=1,648,629 width=0) (actual time=245.414..245.414 rows=1,899,273 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. 63.787 6,704.982 ↓ 1.0 251,272 1

Hash (cost=1,045,167.12..1,045,167.12 rows=249,473 width=8) (actual time=6,704.982..6,704.982 rows=251,272 loops=1)

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

Seq Scan on vcarticle (cost=0.00..1,045,167.12 rows=249,473 width=8) (actual time=0.019..6,641.195 rows=251,272 loops=1)

  • Filter: ((vcarticle_dossier_id = 15) AND ((vcarticle_vcclassif2)::text = 'COUVERT COULEUR'::text))
  • Rows Removed by Filter: 15,753,004
9. 76.701 76.701 ↑ 1.0 1 25,567

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

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

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

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

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

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