explain.depesz.com

PostgreSQL's explain analyze made readable

Result: laFu : Optimization for: plan #7Ukt

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 34,745.473 396,783.229 ↓ 3.3 25,751,740 1

WindowAgg (cost=19,115,805.37..19,273,257.33 rows=7,872,598 width=111) (actual time=329,985.206..396,783.229 rows=25,751,740 loops=1)

  • Buffers: shared hit=599,785 read=450,643, temp read=451,885 written=451,989
2. 68,486.085 362,037.756 ↓ 3.3 25,751,740 1

Sort (cost=19,115,805.37..19,135,486.87 rows=7,872,598 width=79) (actual time=329,985.193..362,037.756 rows=25,751,740 loops=1)

  • Sort Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.date_modification
  • Sort Method: external merge Disk: 2,283,592kB
  • Buffers: shared hit=599,785 read=450,643, temp read=451,885 written=451,989
3. 25,412.066 293,551.671 ↓ 3.3 25,751,740 1

Group (cost=15,331,250.14..17,864,250.92 rows=7,872,598 width=79) (actual time=185,832.303..293,551.671 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=599,785 read=450,643, temp read=166,436 written=166,474
4. 51,885.092 268,139.605 ↓ 1.6 25,847,050 1

Gather Merge (cost=15,331,250.14..17,746,161.95 rows=15,745,196 width=79) (actual time=185,832.299..268,139.605 rows=25,847,050 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=1,928,773 read=1,230,631, temp read=498,161 written=498,276
5. 11,805.219 216,254.513 ↓ 1.1 8,615,683 3 / 3

Group (cost=15,330,250.11..15,927,775.63 rows=7,872,598 width=79) (actual time=185,655.733..216,254.513 rows=8,615,683 loops=3)

  • Group Key: dossier_voyage_histo.id_dossier_voyage, dossier_voyage_histo.regroupement_statut, dossier_voyage_histo.date_modification
  • Buffers: shared hit=1,928,773 read=1,230,631, temp read=498,161 written=498,276
6. 105,608.907 204,449.294 ↑ 4.0 15,005,290 3 / 3

Sort (cost=15,330,250.11..15,479,631.49 rows=59,752,552 width=79) (actual time=185,655.728..204,449.294 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: 1,331,488kB
  • Buffers: shared hit=1,928,773 read=1,230,631, temp read=498,161 written=498,276
7. 51,219.086 98,840.387 ↑ 4.0 15,005,290 3 / 3

Merge Join (cost=2.07..4,957,439.01 rows=59,752,552 width=79) (actual time=1.210..98,840.387 rows=15,005,290 loops=3)

  • Merge Cond: (passager_segment.id_dossier_voyage = dossier_voyage_histo.id_dossier_voyage)
  • Buffers: shared hit=1,928,748 read=1,230,631
8. 7,123.448 7,123.448 ↑ 1.5 14,496,659 3 / 3

Parallel Index Only Scan using idx_passager_segment_id_dossier_voyage on passager_segment (cost=0.56..1,597,727.43 rows=21,079,767 width=26) (actual time=0.053..7,123.448 rows=14,496,659 loops=3)

  • Heap Fetches: 0
  • Buffers: shared hit=229 read=262,056
9. 23,822.602 40,497.853 ↓ 1.2 32,294,554 3 / 3

Materialize (cost=0.56..2,708,728.40 rows=25,985,362 width=79) (actual time=0.133..40,497.853 rows=32,294,554 loops=3)

  • Buffers: shared hit=1,928,519 read=968,575
10. 16,675.251 16,675.251 ↑ 1.0 25,904,948 3 / 3

Index Scan using idx_dossier_voyage_histo_id_dossier_voyage on dossier_voyage_histo (cost=0.56..2,643,764.99 rows=25,985,362 width=79) (actual time=0.127..16,675.251 rows=25,904,948 loops=3)

  • Buffers: shared hit=1,928,519 read=968,575
Planning time : 7.487 ms
Execution time : 407,211.108 ms