explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EMZK : Optimization for: plan #gCJ3

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.064 2,327.575 ↑ 4.0 252 1

GroupAggregate (cost=1,974,756.35..1,974,776.71 rows=1,018 width=16) (actual time=2,324.294..2,327.575 rows=252 loops=1)

  • Group Key: (date_trunc('day'::text, vcentete.vcentete_date))
2. 5.936 2,325.511 ↓ 23.6 24,010 1

Sort (cost=1,974,756.35..1,974,758.90 rows=1,018 width=12) (actual time=2,324.272..2,325.511 rows=24,010 loops=1)

  • Sort Key: (date_trunc('day'::text, vcentete.vcentete_date))
  • Sort Method: quicksort Memory: 1894kB
3. 10.149 2,319.575 ↓ 23.6 24,010 1

Hash Join (cost=446,941.40..1,974,705.50 rows=1,018 width=12) (actual time=416.308..2,319.575 rows=24,010 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
4. 23.808 2,309.326 ↓ 8.6 26,348 1

Nested Loop (cost=446,925.25..1,974,665.18 rows=3,054 width=20) (actual time=416.198..2,309.326 rows=26,348 loops=1)

5. 408.654 2,232.822 ↑ 1.0 26,348 1

Hash Join (cost=446,924.82..1,929,345.64 rows=27,281 width=12) (actual time=416.183..2,232.822 rows=26,348 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
6. 1,420.474 1,631.098 ↓ 1.0 1,903,182 1

Bitmap Heap Scan on vcligne (cost=52,003.97..1,508,407.77 rows=1,835,256 width=12) (actual time=222.335..1,631.098 rows=1,903,182 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-10-04 23:59:59.999999'::timestamp without time zone))
  • Rows Removed by Index Recheck: 206026
  • Filter: ((vcligne_typelotcalc)::text = ANY ('{"Article simple","Article lot détail","Article assemblé détail"}'::text[]))
  • Rows Removed by Filter: 187
  • Heap Blocks: exact=64443 lossy=133058
7. 210.624 210.624 ↓ 1.0 1,917,971 1

Bitmap Index Scan on vcligne_date_sk (cost=0.00..51,545.16 rows=1,836,848 width=0) (actual time=210.624..210.624 rows=1,917,971 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-10-04 23:59:59.999999'::timestamp without time zone))
8. 40.113 193.070 ↓ 1.1 253,158 1

Hash (cost=390,982.62..390,982.62 rows=240,018 width=8) (actual time=193.070..193.070 rows=253,158 loops=1)

  • Buckets: 262144 Batches: 2 Memory Usage: 7004kB
9. 152.957 152.957 ↓ 1.1 253,158 1

Index Scan using vcarticle_vcclassif2_sk on vcarticle (cost=0.56..390,982.62 rows=240,018 width=8) (actual time=0.023..152.957 rows=253,158 loops=1)

  • Index Cond: ((vcarticle_dossier_id = 15) AND ((vcarticle_vcclassif2)::text = 'COUVERT COULEUR'::text))
10. 52.696 52.696 ↑ 1.0 1 26,348

Index Scan using vcentete_pk on vcentete (cost=0.43..1.65 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=26,348)

  • Index Cond: (vcentete_id = vcligne.vcligne_vcentete_id)
  • Filter: ((vcentete_date >= '2019-01-01 00:00:00'::timestamp without time zone) AND (vcentete_date <= '2019-10-04 23:59:59.999999'::timestamp without time zone) AND (vcentete_dossier_id = 15))
11. 0.020 0.100 ↓ 1.0 109 1

Hash (cost=14.81..14.81 rows=107 width=8) (actual time=0.100..0.100 rows=109 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
12. 0.080 0.080 ↓ 1.0 109 1

Seq Scan on adhetablissement (cost=0.00..14.81 rows=107 width=8) (actual time=0.008..0.080 rows=109 loops=1)

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