explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Ukt

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 34,803.061 433,073.919 ↓ 3.3 25,751,740 1

WindowAgg (cost=21,599,035.88..21,756,487.86 rows=7,872,599 width=111) (actual time=365,906.065..433,073.919 rows=25,751,740 loops=1)

  • Buffers: shared hit=872869 read=1330949, temp read=451339 written=451443
2. 68,358.535 398,270.858 ↓ 3.3 25,751,740 1

Sort (cost=21,599,035.88..21,618,717.38 rows=7,872,599 width=79) (actual time=365,906.039..398,270.858 rows=25,751,740 loops=1)

  • Sort Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.date_modification
  • Sort Method: external merge Disk: 2283592kB
  • Buffers: shared hit=872869 read=1330949, temp read=451339 written=451443
3. 25,200.316 329,912.323 ↓ 3.3 25,751,740 1

Group (cost=17,814,480.30..20,347,481.31 rows=7,872,599 width=79) (actual time=220,622.751..329,912.323 rows=25,751,740 loops=1)

  • Group Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.regroupement_statut, dossier_voyage_histo.date_modification
  • Buffers: shared hit=872869 read=1330949, temp read=165890 written=165928
4. 53,348.598 304,712.007 ↓ 1.6 25,864,312 1

Gather Merge (cost=17,814,480.30..20,229,392.32 rows=15,745,198 width=79) (actual time=220,622.748..304,712.007 rows=25,864,312 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=2787247 read=3824386, temp read=498151 written=498265
5. 11,914.727 251,363.409 ↓ 1.1 8,621,437 3 / 3

Group (cost=17,813,480.28..18,411,005.77 rows=7,872,599 width=79) (actual time=220,591.739..251,363.409 rows=8,621,437 loops=3)

  • Group Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.regroupement_statut, dossier_voyage_histo.date_modification
  • Buffers: shared hit=2787247 read=3824386, temp read=498151 written=498265
6. 108,415.318 239,448.682 ↑ 4.0 15,005,290 3 / 3

Sort (cost=17,813,480.28..17,962,861.65 rows=59,752,549 width=79) (actual time=220,591.734..239,448.682 rows=15,005,290 loops=3)

  • Sort Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.regroupement_statut, dossier_voyage_histo.date_modification
  • Sort Method: external merge Disk: 1327120kB
  • Buffers: shared hit=2787247 read=3824386, temp read=498151 written=498265
7. 53,171.594 131,033.364 ↑ 4.0 15,005,290 3 / 3

Merge Join (cost=3.71..7,440,669.59 rows=59,752,549 width=79) (actual time=0.709..131,033.364 rows=15,005,290 loops=3)

  • Merge Cond: (passager_segment.id_dossier_voyage = dossier_voyage_histo.id_dossier_voyage)
  • Buffers: shared hit=2787222 read=3824386
8. 29,551.408 29,551.408 ↑ 1.5 14,496,659 3 / 3

Parallel Index Only Scan using idx_passager_segment_id_dossier_voyage on passager_segment (cost=0.56..4,489,241.43 rows=21,079,767 width=26) (actual time=0.076..29,551.408 rows=14,496,659 loops=3)

  • Heap Fetches: 14481591
  • Buffers: shared hit=852509 read=2855811
9. 23,841.333 48,310.362 ↓ 1.2 32,344,182 3 / 3

Materialize (cost=0.56..2,708,728.43 rows=25,985,364 width=79) (actual time=0.028..48,310.362 rows=32,344,182 loops=3)

  • Buffers: shared hit=1934713 read=968575
10. 24,469.029 24,469.029 ↑ 1.0 25,960,330 3 / 3

Index Scan using idx_dossier_voyage_histo_id_dossier_voyage on dossier_voyage_histo (cost=0.56..2,643,765.02 rows=25,985,364 width=79) (actual time=0.022..24,469.029 rows=25,960,330 loops=3)

  • Buffers: shared hit=1934713 read=968575
Planning time : 42.548 ms
Execution time : 443,653.056 ms