explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qJI2 : Optimization for: Optimization for: Optimization for: plan #5Hn; plan #6TVY; plan #aPEe

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 200.640 10,219.241 ↑ 1.0 1 1

Aggregate (cost=2,963,169.73..2,963,169.74 rows=1 width=24) (actual time=10,219.241..10,219.241 rows=1 loops=1)

2. 2,061.007 10,018.601 ↑ 1.0 1,877,335 1

Hash Join (cost=1,337,610.91..2,944,289.98 rows=1,887,975 width=24) (actual time=6,543.676..10,018.601 rows=1,877,335 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
3. 1,426.957 1,675.444 ↑ 1.0 1,877,335 1

Bitmap Heap Scan on vcligne (cost=54,135.76..1,510,332.86 rows=1,892,454 width=32) (actual time=260.167..1,675.444 rows=1,877,335 loops=1)

  • Recheck Cond: ((vcligne_dossier_id = 15) AND (vcligne_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcligne_date <= '2019-09-30 23:59:59'::timestamp without time zone))
  • Rows Removed by Index Recheck: 215096
  • Filter: ((vcligne_typelotcalc)::text = ANY ('{"Article simple","Article lot détail","Article assemblé détail"}'::text[]))
  • Rows Removed by Filter: 187
  • Heap Blocks: exact=65450 lossy=133062
4. 248.487 248.487 ↓ 1.0 1,897,956 1

Bitmap Index Scan on vcligne_date_sk (cost=0.00..53,662.65 rows=1,893,927 width=0) (actual time=248.487..248.487 rows=1,897,956 loops=1)

  • Index Cond: ((vcligne_dossier_id = 15) AND (vcligne_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcligne_date <= '2019-09-30 23:59:59'::timestamp without time zone))
5. 2,154.694 6,282.150 ↓ 1.0 16,168,714 1

Hash (cost=1,018,255.26..1,018,255.26 rows=16,165,751 width=8) (actual time=6,282.150..6,282.150 rows=16,168,714 loops=1)

  • Buckets: 262144 Batches: 128 Memory Usage: 7005kB
6. 4,127.456 4,127.456 ↓ 1.0 16,168,714 1

Seq Scan on vcarticle (cost=0.00..1,018,255.26 rows=16,165,751 width=8) (actual time=0.007..4,127.456 rows=16,168,714 loops=1)

  • Filter: (vcarticle_dossier_id = 15)
  • Rows Removed by Filter: 38643
Planning time : 0.651 ms