explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gCJ3

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.099 15,077.574 ↑ 34.5 252 1

GroupAggregate (cost=2,354,230.85..2,354,404.71 rows=8,693 width=16) (actual time=15,074.145..15,077.574 rows=252 loops=1)

  • Group Key: (date_trunc('day'::text, vcentete.vcentete_date))
2. 6.260 15,075.475 ↓ 2.8 24,010 1

Sort (cost=2,354,230.85..2,354,252.58 rows=8,693 width=12) (actual time=15,074.121..15,075.475 rows=24,010 loops=1)

  • Sort Key: (date_trunc('day'::text, vcentete.vcentete_date))
  • Sort Method: quicksort Memory: 1894kB
3. 11.415 15,069.215 ↓ 2.8 24,010 1

Hash Join (cost=394,937.43..2,353,662.08 rows=8,693 width=12) (actual time=432.274..15,069.215 rows=24,010 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
4. 0.000 15,057.616 ↓ 1.0 26,348 1

Nested Loop (cost=394,921.28..2,353,439.55 rows=26,079 width=20) (actual time=432.070..15,057.616 rows=26,348 loops=1)

5. 3,294.989 14,314.497 ↑ 1.2 194,156 1

Hash Join (cost=394,920.85..2,211,975.41 rows=232,939 width=12) (actual time=432.052..14,314.497 rows=194,156 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
6. 10,588.157 10,588.157 ↓ 1.0 15,713,919 1

Seq Scan on vcligne (cost=0.00..1,601,988.56 rows=15,670,564 width=12) (actual time=0.023..10,588.157 rows=15,713,919 loops=1)

  • Filter: ((vcligne_dossier_id = 15) AND ((vcligne_typelotcalc)::text = ANY ('{"Article simple","Article lot détail","Article assemblé détail"}'::text[])))
  • Rows Removed by Filter: 63002
7. 44.494 431.351 ↓ 1.1 253,158 1

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

  • Buckets: 262144 Batches: 2 Memory Usage: 7004kB
8. 386.857 386.857 ↓ 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.089..386.857 rows=253,158 loops=1)

  • Index Cond: ((vcarticle_dossier_id = 15) AND ((vcarticle_vcclassif2)::text = 'COUVERT COULEUR'::text))
9. 776.624 776.624 ↓ 0.0 0 194,156

Index Scan using vcentete_pk on vcentete (cost=0.43..0.60 rows=1 width=24) (actual time=0.004..0.004 rows=0 loops=194,156)

  • 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))
  • Rows Removed by Filter: 1
10. 0.025 0.184 ↓ 1.0 109 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
11. 0.159 0.159 ↓ 1.0 109 1

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

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