explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PpAg

Settings
# exclusive inclusive rows x rows loops node
1. 0.060 8,634.664 ↓ 462.0 462 1

Subquery Scan on journalaction (cost=645.87..645.90 rows=1 width=116) (actual time=8,634.299..8,634.664 rows=462 loops=1)

  • Filter: (journalaction.numero_ligne = 1)
  • Rows Removed by Filter: 15
2. 0.291 8,634.604 ↓ 477.0 477 1

WindowAgg (cost=645.87..645.89 rows=1 width=124) (actual time=8,634.294..8,634.604 rows=477 loops=1)

3. 1.277 8,634.313 ↓ 477.0 477 1

Sort (cost=645.87..645.87 rows=1 width=116) (actual time=8,634.278..8,634.313 rows=477 loops=1)

  • Sort Key: pt.sm001000_pi2_programmation_travauxid, ad.sm001000_pi_d_effc_even DESC, ad.sm001000_pi_d_fin_actn
  • Sort Method: quicksort Memory: 92kB
4. 12.308 8,633.036 ↓ 477.0 477 1

Nested Loop (cost=142.93..645.86 rows=1 width=116) (actual time=28.184..8,633.036 rows=477 loops=1)

  • Join Filter: (nea.sm001000_pi9_nature_evenement_affaireid = ad.sm001000_pi9_nature_evenement_affaireid)
  • Rows Removed by Join Filter: 4592
5. 4.013 3,846.009 ↓ 40.5 4,009 1

Nested Loop (cost=142.51..584.13 rows=99 width=132) (actual time=8.803..3,846.009 rows=4,009 loops=1)

6. 0.764 1.996 ↓ 40.0 480 1

Merge Join (cost=142.09..152.94 rows=12 width=132) (actual time=0.889..1.996 rows=480 loops=1)

  • Merge Cond: ((sn.statut = pt.sm001000_pi_s_prog_redd) AND (sn.type_ptrc = pt.sm001000_pi_c_typ_prog_redd))
7. 0.023 0.673 ↑ 29.7 32 1

Sort (cost=104.66..107.03 rows=949 width=64) (actual time=0.667..0.673 rows=32 loops=1)

  • Sort Key: sn.statut, sn.type_ptrc
  • Sort Method: quicksort Memory: 28kB
8. 0.020 0.650 ↑ 28.8 33 1

Hash Join (cost=5.09..57.73 rows=949 width=64) (actual time=0.638..0.650 rows=33 loops=1)

  • Hash Cond: (sn.nature = (nea.sm001000_pi_c_natr_even_affr)::integer)
9. 0.570 0.570 ↑ 61.8 33 1

Seq Scan on statut_nature sn (cost=0.00..30.40 rows=2,040 width=12) (actual time=0.568..0.570 rows=33 loops=1)

10. 0.025 0.060 ↑ 1.0 93 1

Hash (cost=3.93..3.93 rows=93 width=56) (actual time=0.060..0.060 rows=93 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
11. 0.035 0.035 ↑ 1.0 93 1

Seq Scan on sm001000_pi9_nature_evenement_affairebase nea (cost=0.00..3.93 rows=93 width=56) (actual time=0.006..0.035 rows=93 loops=1)

12. 0.467 0.559 ↑ 1.0 480 1

Sort (cost=37.42..38.63 rows=484 width=80) (actual time=0.216..0.559 rows=480 loops=1)

  • Sort Key: pt.sm001000_pi_s_prog_redd, pt.sm001000_pi_c_typ_prog_redd
  • Sort Method: quicksort Memory: 89kB
13. 0.092 0.092 ↑ 1.0 462 1

Seq Scan on progtravvers pt (cost=0.00..15.84 rows=484 width=80) (actual time=0.005..0.092 rows=462 loops=1)

14. 3,840.000 3,840.000 ↑ 1.1 8 480

Index Scan using "index_pi2_programmation_travauxId" on sm001000_pi8_etape_dossierbase ed (cost=0.42..35.84 rows=9 width=32) (actual time=1.158..8.000 rows=8 loops=480)

  • Index Cond: (sm001000_pi2_programmation_travauxid = pt.sm001000_pi2_programmation_travauxid_actv)
15. 4,774.719 4,774.719 ↑ 2.0 1 4,009

Index Scan using "INDEX_sm001000_pi8_etape_dossierid" on sm001000_pi8_action_dossierbase ad (cost=0.42..0.60 rows=2 width=48) (actual time=1.001..1.191 rows=1 loops=4,009)

  • Index Cond: (sm001000_pi8_etape_dossierid = ed.sm001000_pi8_etape_dossierid)
Planning time : 5.667 ms